On this page:

The global the-color-database object is an instance of color-database<%>. It maintains a database of standard RGB colors for a predefined set of named colors (such as “black” and “light gray”). See find-color for information on how color names are normalized.

The following colors are in the database:

      Orange Red


      Dark Red




      Deep Pink


      Indian Red

      Medium Violet Red

      Violet Red

      Light Coral

      Hot Pink

      Pale Violet Red

      Light Pink

      Rosy Brown



      Lavender Blush



      Saddle Brown


      Dark Orange






      Dark Goldenrod


      Sandy Brown

      Light Salmon

      Dark Salmon






      Navajo White

      Peach Puff


      Dark Khaki




      Pale Goldenrod

      Blanched Almond

      Medium Goldenrod

      Papaya Whip

      Misty Rose

      Lemon Chiffon

      Antique White


      Light Goldenrod Yellow

      Old Lace


      Light Yellow

      Sea Shell


      Floral White



      Lawn Green


      Green Yellow

      Yellow Green

      Medium Forest Green

      Olive Drab

      Dark Olive Green

      Dark Sea Green


      Dark Green

      Lime Green

      Forest Green

      Spring Green

      Medium Spring Green

      Sea Green

      Medium Sea Green


      Light Green

      Pale Green

      Medium Aquamarine


      Light Sea Green

      Medium Turquoise


      Mint Cream

      Royal Blue

      Dodger Blue

      Deep Sky Blue


      Steel Blue

      Light Sky Blue

      Dark Turquoise



      Dark Cyan


      Sky Blue

      Cadet Blue


      Dark Slate Gray

      Light Slate Gray

      Slate Gray

      Light Steel Blue

      Light Blue

      Powder Blue

      Pale Turquoise

      Light Cyan

      Alice Blue


      Medium Blue

      Cornflower Blue

      Dark Blue

      Midnight Blue




      Blue Violet

      Medium Slate Blue

      Slate Blue


      Dark Slate Blue

      Dark Violet

      Dark Orchid

      Medium Purple

      Cornflower Blue

      Medium Orchid



      Dark Magenta





      Ghost White


      White Smoke


      Light Gray



      Dark Gray

      Dim Gray


See also color%.


(send a-color-database find-color color-name)

  (or/c (is-a?/c color%) #f)
  color-name : string?
Finds a color by name (character case is ignored). If no color is found for the name, #f is returned, otherwise the result is an immutable color object.

Color names are normalized by case and spaces are removed from colors before they are looked up in the database, with two exceptions: "cornflower blue" and "cadet blue". For those two colors, the names are compared in a case-insensitive way, but spaces are not removed, as the spaceless versions of those names are different colors than the ones with spaces in them.

> (define (show-colors-named . names)
     (for/list ([name (in-list names)])
        (filled-rectangle 60 40)
        (send the-color-database find-color name)))))
> (show-colors-named "blue"
                     "B L U E")


> (show-colors-named "cornflowerblue"
                     "CORN flow ERB lue"
                     "cornflower blue"
                     "CORNFLOWER BLUE"
                     "cornflower blue "
                     " CORNFLOWER BLUE"
                     "cornflower  blue")


Changed in version 1.16 of package draw-lib: Changed normalization to more generally remove spaces.


(send a-color-database get-names)  (listof string?)

Returns an alphabetically sorted list of case-folded color names for which find-color returns a color% value.