next up previous contents index
Next: Preparing Printed Output Up: plt Tutorial and Cookbook Previous: Advanced Axis Options

Color Names

Colors can be specified as hexadecimal triplets, in the form #$rrggbb$, where $rr$, $gg$, and $bb$ are the red, green, and blue components respectively. Thus, for example, #0000ff is fully saturated blue, #000080 is dark blue, and #ffff00 is bright yellow (100% red + 100% green).

Alternatively, named colors from the X11R6 color database can be used to specify a color. Note that case is not significant in color names (blue, Blue, BLUE, and bLuE are all acceptable names for the same color). These named colors are available for either X11 or PostScript plots:

AliceBlue               green1                  orchid
AntiqueWhite            green2                  orchid1
AntiqueWhite1           green3                  orchid2
AntiqueWhite2           green4                  orchid3
AntiqueWhite3           GreenYellow             orchid4
AntiqueWhite4           grey                    PaleGoldenrod
aquamarine              honeydew                PaleGreen
aquamarine1             honeydew1               PaleGreen1
aquamarine2             honeydew2               PaleGreen2
aquamarine3             honeydew3               PaleGreen3
aquamarine4             honeydew4               PaleGreen4
azure                   HotPink                 PaleTurquoise
azure1                  HotPink1                PaleTurquoise1
azure2                  HotPink2                PaleTurquoise2
azure3                  HotPink3                PaleTurquoise3
azure4                  HotPink4                PaleTurquoise4
beige                   IndianRed               PaleVioletRed
bisque                  IndianRed1              PaleVioletRed1
bisque1                 IndianRed2              PaleVioletRed2
bisque2                 IndianRed3              PaleVioletRed3
bisque3                 IndianRed4              PaleVioletRed4
bisque4                 ivory                   PapayaWhip
black                   ivory1                  PeachPuff
BlanchedAlmond          ivory2                  PeachPuff1
blue                    ivory3                  PeachPuff2
blue1                   ivory4                  PeachPuff3
blue2                   khaki                   PeachPuff4
blue3                   khaki1                  peru
blue4                   khaki2                  pink
BlueViolet              khaki3                  pink1
brown                   khaki4                  pink2
brown1                  lavender                pink3
brown2                  LavenderBlush           pink4
brown3                  LavenderBlush1          plum
brown4                  LavenderBlush2          plum1
burlywood               LavenderBlush3          plum2
burlywood1              LavenderBlush4          plum3
burlywood2              LawnGreen               plum4
burlywood3              LemonChiffon            PowderBlue
burlywood4              LemonChiffon1           purple
CadetBlue               LemonChiffon2           purple1
CadetBlue1              LemonChiffon3           purple2
CadetBlue2              LemonChiffon4           purple3
CadetBlue3              LightBlue               purple4
CadetBlue4              LightBlue1              red
chartreuse              LightBlue2              red1
chartreuse1             LightBlue3              red2
chartreuse2             LightBlue4              red3
chartreuse3             LightCoral              red4
chartreuse4             LightCyan               RosyBrown
chocolate               LightCyan1              RosyBrown1
chocolate1              LightCyan2              RosyBrown2
chocolate2              LightCyan3              RosyBrown3
chocolate3              LightCyan4              RosyBrown4
chocolate4              LightGoldenrod          RoyalBlue
coral                   LightGoldenrod1         RoyalBlue1
coral1                  LightGoldenrod2         RoyalBlue2
coral2                  LightGoldenrod3         RoyalBlue3
coral3                  LightGoldenrod4         RoyalBlue4
coral4                  LightGoldenrodYellow    SaddleBrown
CornflowerBlue          LightGray               salmon
cornsilk                LightGreen              salmon1
cornsilk1               LightGrey               salmon2
cornsilk2               LightPink               salmon3
cornsilk3               LightPink1              salmon4
cornsilk4               LightPink2              SandyBrown
cyan                    LightPink3              SeaGreen
cyan1                   LightPink4              SeaGreen1
cyan2                   LightSalmon             SeaGreen2
cyan3                   LightSalmon1            SeaGreen3
cyan4                   LightSalmon2            SeaGreen4
DarkBlue                LightSalmon3            seashell
DarkCyan                LightSalmon4            seashell1
DarkGoldenrod           LightSeaGreen           seashell2
DarkGoldenrod1          LightSkyBlue            seashell3
DarkGoldenrod2          LightSkyBlue1           seashell4
DarkGoldenrod3          LightSkyBlue2           sienna
DarkGoldenrod4          LightSkyBlue3           sienna1
DarkGray                LightSkyBlue4           sienna2
DarkGreen               LightSlateBlue          sienna3
DarkGrey                LightSlateGray          sienna4
DarkKhaki               LightSlateGrey          SkyBlue
DarkMagenta             LightSteelBlue          SkyBlue1
DarkOliveGreen          LightSteelBlue1         SkyBlue2
DarkOliveGreen1         LightSteelBlue2         SkyBlue3
DarkOliveGreen2         LightSteelBlue3         SkyBlue4
DarkOliveGreen3         LightSteelBlue4         SlateBlue
DarkOliveGreen4         LightYellow             SlateBlue1
DarkOrange              LightYellow1            SlateBlue2
DarkOrange1             LightYellow2            SlateBlue3
DarkOrange2             LightYellow3            SlateBlue4
DarkOrange3             LightYellow4            SlateGray
DarkOrange4             LimeGreen               SlateGray1
DarkOrchid              linen                   SlateGray2
DarkOrchid1             magenta                 SlateGray3
DarkOrchid2             magenta1                SlateGray4
DarkOrchid3             magenta2                SlateGrey
DarkOrchid4             magenta3                snow
DarkRed                 magenta4                snow1
DarkSalmon              maroon                  snow2
DarkSeaGreen            maroon1                 snow3
DarkSeaGreen1           maroon2                 snow4
DarkSeaGreen2           maroon3                 SpringGreen
DarkSeaGreen3           maroon4                 SpringGreen1
DarkSeaGreen4           MediumAquamarine        SpringGreen2
DarkSlateBlue           MediumBlue              SpringGreen3
DarkSlateGray           MediumOrchid            SpringGreen4
DarkSlateGray1          MediumOrchid1           SteelBlue
DarkSlateGray2          MediumOrchid2           SteelBlue1
DarkSlateGray3          MediumOrchid3           SteelBlue2
DarkSlateGray4          MediumOrchid4           SteelBlue3
DarkSlateGrey           MediumPurple            SteelBlue4
DarkTurquoise           MediumPurple1           tan
DarkViolet              MediumPurple2           tan1
DeepPink                MediumPurple3           tan2
DeepPink1               MediumPurple4           tan3
DeepPink2               MediumSeaGreen          tan4
DeepPink3               MediumSlateBlue         thistle
DeepPink4               MediumSpringGreen       thistle1
DeepSkyBlue             MediumTurquoise         thistle2
DeepSkyBlue1            MediumVioletRed         thistle3
DeepSkyBlue2            MidnightBlue            thistle4
DeepSkyBlue3            MintCream               tomato
DeepSkyBlue4            MistyRose               tomato1
DimGray                 MistyRose1              tomato2
DimGrey                 MistyRose2              tomato3
DodgerBlue              MistyRose3              tomato4
DodgerBlue1             MistyRose4              turquoise
DodgerBlue2             moccasin                turquoise1
DodgerBlue3             NavajoWhite             turquoise2
DodgerBlue4             NavajoWhite1            turquoise3
firebrick               NavajoWhite2            turquoise4
firebrick1              NavajoWhite3            violet
firebrick2              NavajoWhite4            VioletRed
firebrick3              navy                    VioletRed1
firebrick4              NavyBlue                VioletRed2
FloralWhite             OldLace                 VioletRed3
ForestGreen             OliveDrab               VioletRed4
gainsboro               OliveDrab1              wheat
GhostWhite              OliveDrab2              wheat1
gold                    OliveDrab3              wheat2
gold1                   OliveDrab4              wheat3
gold2                   orange                  wheat4
gold3                   orange1                 white
gold4                   orange2                 WhiteSmoke
goldenrod               orange3                 yellow
goldenrod1              orange4                 yellow1
goldenrod2              OrangeRed               yellow2
goldenrod3              OrangeRed1              yellow3
goldenrod4              OrangeRed2              yellow4
gray                    OrangeRed3              YellowGreen
green                   OrangeRed4

In addition, 101 shades of grey can be specified using grey0 or gray0 (black) through grey100 or gray100 (white).

When producing Postscript plots, plt supplies the translation from color names names to RGB values, so the names above are always available. When producing X11 plots, however, the X server performs the translation; thus, if you are using an old or nonstandard X server, it is possible that a different set of color names may be recognized by the server. If you encounter problems, look for the file rgb.h in the directory that contains `.h' files associated with the X11 libraries; this file will contain the color name database for your X server.

next up previous contents index
Next: Preparing Printed Output Up: plt Tutorial and Cookbook Previous: Advanced Axis Options
George B. Moody (