Color Names and Conversions

The package "colors" provides color manipulation classes.
  1. The Colors class provides static functions GetNamedColor, GetRGBColor, and GetCMYKColor, each of which returns an int containing an 0xRRGGBB color value. GetRGBColor and GetCMYKColor take doubles in the range 0.0 to 1.0. GetNamedColor takes a name from the list of standard dvips colors and uses a lookup table.

  2. The CreateColorTable class is an application class containing the original CMYK color values for the GetNamedColor colors. This class is used to generate the RGB values which are actually stored in the Colors class.

  3. The CreateColorDocumentation class is an application class which generates html text with properly colored names for all of the colors known to the Colors class.

    The output looks like:

    GreenYellow, Yellow, Goldenrod, Dandelion, Apricot, Peach, Melon, YellowOrange, Orange, BurntOrange, Bittersweet, RedOrange, Mahogany, Maroon, BrickRed, Red, OrangeRed, RubineRed, WildStrawberry, Salmon, CarnationPink, Magenta, VioletRed, Rhodamine, Mulberry, RedViolet, Fuchsia, Lavender, Thistle, Orchid, DarkOrchid, Purple, Plum, Violet, RoyalPurple, BlueViolet, Periwinkle, CadetBlue, CornflowerBlue, MidnightBlue, NavyBlue, RoyalBlue, Blue, Cerulean, Cyan, ProcessBlue, SkyBlue, Turquoise, TealBlue, Aquamarine, BlueGreen, Emerald, JungleGreen, SeaGreen, Green, ForestGreen, PineGreen, LimeGreen, YellowGreen, SpringGreen, OliveGreen, RawSienna, Sepia, Brown, Tan, Gray, Black, (White).