color_name2rgb Subroutine

public subroutine color_name2rgb(name, r, g, b, echoname)

NAME

 COLOR_NAME2RGB(3f) - [M_pixel:COLOR] returns the RGB values in the
                      range 0 to 100 for a given known color name.
 (LICENSE:PD)

SYNOPSIS

subroutine color_name2rgb(name,r,g,b,echoname)

 character(len=20),intent(in)   :: name
 real,intent(out)               :: r,g,b
 character(len=20),intent(out)  :: echoname

DESCRIPTION

 COLOR_NAME2RGB() returns the RGB values in the range 0 to 100
 for a given known color name. Most X11 Windows color names are
 supported. If the name is not found, ECHONAME is set to "Unknown".

EXAMPLE

A sample program:

 program demo_color_name2rgb
 use M_pixel, only : hue, color_name2rgb
 implicit none
 !
 ! list colors known to colorname2rgb(3f) & corresponding RGB values
 !
 character(len=20) :: name
 character(len=20) :: echoname
 real              :: red,green,blue
 integer           :: i
 TRYALL: do i=1,10000
    ! weird little thing where the color names have aliases
    ! that are numeric strings
    write(name,'(i0)')i
    ! get the RGB values and English name of the color
    call color_name2rgb(name,red,green,blue,echoname)
    ! the last color name is "Unknown" so the loop should exit
    if(echoname.eq.'Unknown')exit TRYALL
    ! display the English name and RGB values for the name
    write(*,*)echoname,int([red,green,blue])
 enddo TRYALL
 !write(*,*)'Number of colors found is ',i-1
 end program demo_color_name2rgb

AUTHOR

John S. Urban

LICENSE

Public Domain

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name
real, intent(out) :: r
real, intent(out) :: g
real, intent(out) :: b
character(len=*), intent(out), optional :: echoname

Contents

Source Code


Source Code

subroutine color_name2rgb(name,r,g,b,echoname)

! ident_73="@(#) M_pixel color_name2rgb(3f) given a color name return rgb color values in range 0 to 100"

character(len=*),intent(in)            :: name
real,intent(out)                       :: r,g,b
character(len=*),intent(out),optional  :: echoname
character(len=20)                      :: newname
!-----------------------------------------------------------------------------------------------------------------------------------
! returns name in ECHONAME; which is usually not useful unless NAME represents an integer string.
! Note that an integer converted to a string can be used to go sequentially thru the names until NEWNAME="Unknown"
! Color names can generally be listed using showrgb(1) in GNU/Linux and Unix environments that support X11 Windows:

! A structure would normally be used for the data; but a large SELECT is easy to maintain.
! a numeric name is an alias for each color to facilitate going thru them sequentially since they are not an array.
   SELECT case(TRIM(lower(name)))

   CASE("1",   "snow")                  ;  newname="snow"                  ;  r=255  ;  g=250  ;  b=250
   CASE("2",   "ghostwhite")            ;  newname="ghostwhite"            ;  r=248  ;  g=248  ;  b=255
   CASE("3",   "whitesmoke")            ;  newname="whitesmoke"            ;  r=245  ;  g=245  ;  b=245
   CASE("4",   "gainsboro")             ;  newname="gainsboro"             ;  r=220  ;  g=220  ;  b=220
   CASE("5",   "floralwhite")           ;  newname="floralwhite"           ;  r=255  ;  g=250  ;  b=240
   CASE("6",   "oldlace")               ;  newname="oldlace"               ;  r=253  ;  g=245  ;  b=230
   CASE("7",   "linen")                 ;  newname="linen"                 ;  r=250  ;  g=240  ;  b=230
   CASE("8",   "antiquewhite")          ;  newname="antiquewhite"          ;  r=250  ;  g=235  ;  b=215
   CASE("9",   "papayawhip")            ;  newname="papayawhip"            ;  r=255  ;  g=239  ;  b=213
   CASE("10",  "blanchedalmond")        ;  newname="blanchedalmond"        ;  r=255  ;  g=235  ;  b=205
   CASE("11",  "bisque")                ;  newname="bisque"                ;  r=255  ;  g=228  ;  b=196
   CASE("12",  "peachpuff")             ;  newname="peachpuff"             ;  r=255  ;  g=218  ;  b=185
   CASE("13",  "navajowhite")           ;  newname="navajowhite"           ;  r=255  ;  g=222  ;  b=173
   CASE("14",  "moccasin")              ;  newname="moccasin"              ;  r=255  ;  g=228  ;  b=181
   CASE("15",  "cornsilk")              ;  newname="cornsilk"              ;  r=255  ;  g=248  ;  b=220
   CASE("16",  "ivory")                 ;  newname="ivory"                 ;  r=255  ;  g=255  ;  b=240
   CASE("17",  "lemonchiffon")          ;  newname="lemonchiffon"          ;  r=255  ;  g=250  ;  b=205
   CASE("18",  "seashell")              ;  newname="seashell"              ;  r=255  ;  g=245  ;  b=238
   CASE("19",  "honeydew")              ;  newname="honeydew"              ;  r=240  ;  g=255  ;  b=240
   CASE("20",  "mintcream")             ;  newname="mintcream"             ;  r=245  ;  g=255  ;  b=250
   CASE("21",  "azure")                 ;  newname="azure"                 ;  r=240  ;  g=255  ;  b=255
   CASE("22",  "aliceblue")             ;  newname="aliceblue"             ;  r=240  ;  g=248  ;  b=255
   CASE("23",  "lavender")              ;  newname="lavender"              ;  r=230  ;  g=230  ;  b=250
   CASE("24",  "lavenderblush")         ;  newname="lavenderblush"         ;  r=255  ;  g=240  ;  b=245
   CASE("25",  "mistyrose")             ;  newname="mistyrose"             ;  r=255  ;  g=228  ;  b=225
   CASE("26",  "white")                 ;  newname="white"                 ;  r=255  ;  g=255  ;  b=255
   CASE("27",  "black")                 ;  newname="black"                 ;  r=0    ;  g=0    ;  b=0
   CASE("28",  "darkslategray")         ;  newname="darkslategray"         ;  r=47   ;  g=79   ;  b=79
   CASE("29",  "dimgray")               ;  newname="dimgray"               ;  r=105  ;  g=105  ;  b=105
   CASE("30",  "slategray")             ;  newname="slategray"             ;  r=112  ;  g=128  ;  b=144
   CASE("31",  "lightslategray")        ;  newname="lightslategray"        ;  r=119  ;  g=136  ;  b=153
   CASE("32",  "gray")                  ;  newname="gray"                  ;  r=190  ;  g=190  ;  b=190
   CASE("33",  "lightgray")             ;  newname="lightgray"             ;  r=211  ;  g=211  ;  b=211
   CASE("34",  "midnightblue")          ;  newname="midnightblue"          ;  r=25   ;  g=25   ;  b=112
   CASE("35",  "navy")                  ;  newname="navy"                  ;  r=0    ;  g=0    ;  b=128
   CASE("36",  "navyblue")              ;  newname="navyblue"              ;  r=0    ;  g=0    ;  b=128
   CASE("37",  "cornflowerblue")        ;  newname="cornflowerblue"        ;  r=100  ;  g=149  ;  b=237
   CASE("38",  "darkslateblue")         ;  newname="darkslateblue"         ;  r=72   ;  g=61   ;  b=139
   CASE("39",  "slateblue")             ;  newname="slateblue"             ;  r=106  ;  g=90   ;  b=205
   CASE("40",  "mediumslateblue")       ;  newname="mediumslateblue"       ;  r=123  ;  g=104  ;  b=238
   CASE("41",  "lightslateblue")        ;  newname="lightslateblue"        ;  r=132  ;  g=112  ;  b=255
   CASE("42",  "mediumblue")            ;  newname="mediumblue"            ;  r=0    ;  g=0    ;  b=205
   CASE("43",  "royalblue")             ;  newname="royalblue"             ;  r=65   ;  g=105  ;  b=225
   CASE("44",  "blue")                  ;  newname="blue"                  ;  r=0    ;  g=0    ;  b=255
   CASE("45",  "dodgerblue")            ;  newname="dodgerblue"            ;  r=30   ;  g=144  ;  b=255
   CASE("46",  "deepskyblue")           ;  newname="deepskyblue"           ;  r=0    ;  g=191  ;  b=255
   CASE("47",  "skyblue")               ;  newname="skyblue"               ;  r=135  ;  g=206  ;  b=235
   CASE("48",  "lightskyblue")          ;  newname="lightskyblue"          ;  r=135  ;  g=206  ;  b=250
   CASE("49",  "steelblue")             ;  newname="steelblue"             ;  r=70   ;  g=130  ;  b=180
   CASE("50",  "lightsteelblue")        ;  newname="lightsteelblue"        ;  r=176  ;  g=196  ;  b=222
   CASE("51",  "lightblue")             ;  newname="lightblue"             ;  r=173  ;  g=216  ;  b=230
   CASE("52",  "powderblue")            ;  newname="powderblue"            ;  r=176  ;  g=224  ;  b=230
   CASE("53",  "paleturquoise")         ;  newname="paleturquoise"         ;  r=175  ;  g=238  ;  b=238
   CASE("54",  "darkturquoise")         ;  newname="darkturquoise"         ;  r=0    ;  g=206  ;  b=209
   CASE("55",  "mediumturquoise")       ;  newname="mediumturquoise"       ;  r=72   ;  g=209  ;  b=204
   CASE("56",  "turquoise")             ;  newname="turquoise"             ;  r=64   ;  g=224  ;  b=208
   CASE("57",  "cyan")                  ;  newname="cyan"                  ;  r=0    ;  g=255  ;  b=255
   CASE("58",  "lightcyan")             ;  newname="lightcyan"             ;  r=224  ;  g=255  ;  b=255
   CASE("59",  "cadetblue")             ;  newname="cadetblue"             ;  r=95   ;  g=158  ;  b=160
   CASE("60",  "mediumaquamarine")      ;  newname="mediumaquamarine"      ;  r=102  ;  g=205  ;  b=170
   CASE("61",  "aquamarine")            ;  newname="aquamarine"            ;  r=127  ;  g=255  ;  b=212
   CASE("62",  "darkgreen")             ;  newname="darkgreen"             ;  r=0    ;  g=100  ;  b=0
   CASE("63",  "darkolivegreen")        ;  newname="darkolivegreen"        ;  r=85   ;  g=107  ;  b=47
   CASE("64",  "darkseagreen")          ;  newname="darkseagreen"          ;  r=143  ;  g=188  ;  b=143
   CASE("65",  "seagreen")              ;  newname="seagreen"              ;  r=46   ;  g=139  ;  b=87
   CASE("66",  "mediumseagreen")        ;  newname="mediumseagreen"        ;  r=60   ;  g=179  ;  b=113
   CASE("67",  "lightseagreen")         ;  newname="lightseagreen"         ;  r=32   ;  g=178  ;  b=170
   CASE("68",  "palegreen")             ;  newname="palegreen"             ;  r=152  ;  g=251  ;  b=152
   CASE("69",  "springgreen")           ;  newname="springgreen"           ;  r=0    ;  g=255  ;  b=127
   CASE("70",  "lawngreen")             ;  newname="lawngreen"             ;  r=124  ;  g=252  ;  b=0
   CASE("71",  "green")                 ;  newname="green"                 ;  r=0    ;  g=255  ;  b=0
   CASE("72",  "chartreuse")            ;  newname="chartreuse"            ;  r=127  ;  g=255  ;  b=0
   CASE("73",  "mediumspringgreen")     ;  newname="mediumspringgreen"     ;  r=0    ;  g=250  ;  b=154
   CASE("74",  "greenyellow")           ;  newname="greenyellow"           ;  r=173  ;  g=255  ;  b=47
   CASE("75",  "limegreen")             ;  newname="limegreen"             ;  r=50   ;  g=205  ;  b=50
   CASE("76",  "yellowgreen")           ;  newname="yellowgreen"           ;  r=154  ;  g=205  ;  b=50
   CASE("77",  "forestgreen")           ;  newname="forestgreen"           ;  r=34   ;  g=139  ;  b=34
   CASE("78",  "olivedrab")             ;  newname="olivedrab"             ;  r=107  ;  g=142  ;  b=35
   CASE("79",  "darkkhaki")             ;  newname="darkkhaki"             ;  r=189  ;  g=183  ;  b=107
   CASE("80",  "khaki")                 ;  newname="khaki"                 ;  r=240  ;  g=230  ;  b=140
   CASE("81",  "palegoldenrod")         ;  newname="palegoldenrod"         ;  r=238  ;  g=232  ;  b=170
   CASE("82",  "lightgoldenrodyellow")  ;  newname="lightgoldenrodyellow"  ;  r=250  ;  g=250  ;  b=210
   CASE("83",  "lightyellow")           ;  newname="lightyellow"           ;  r=255  ;  g=255  ;  b=224
   CASE("84",  "yellow")                ;  newname="yellow"                ;  r=255  ;  g=255  ;  b=0
   CASE("85",  "gold")                  ;  newname="gold"                  ;  r=255  ;  g=215  ;  b=0
   CASE("86",  "lightgoldenrod")        ;  newname="lightgoldenrod"        ;  r=238  ;  g=221  ;  b=130
   CASE("87",  "goldenrod")             ;  newname="goldenrod"             ;  r=218  ;  g=165  ;  b=32
   CASE("88",  "darkgoldenrod")         ;  newname="darkgoldenrod"         ;  r=184  ;  g=134  ;  b=11
   CASE("89",  "rosybrown")             ;  newname="rosybrown"             ;  r=188  ;  g=143  ;  b=143
   CASE("90",  "indianred")             ;  newname="indianred"             ;  r=205  ;  g=92   ;  b=92
   CASE("91",  "saddlebrown")           ;  newname="saddlebrown"           ;  r=139  ;  g=69   ;  b=19
   CASE("92",  "sienna")                ;  newname="sienna"                ;  r=160  ;  g=82   ;  b=45
   CASE("93",  "peru")                  ;  newname="peru"                  ;  r=205  ;  g=133  ;  b=63
   CASE("94",  "burlywood")             ;  newname="burlywood"             ;  r=222  ;  g=184  ;  b=135
   CASE("95",  "beige")                 ;  newname="beige"                 ;  r=245  ;  g=245  ;  b=220
   CASE("96",  "wheat")                 ;  newname="wheat"                 ;  r=245  ;  g=222  ;  b=179
   CASE("97",  "sandybrown")            ;  newname="sandybrown"            ;  r=244  ;  g=164  ;  b=96
   CASE("98",  "tan")                   ;  newname="tan"                   ;  r=210  ;  g=180  ;  b=140
   CASE("99",  "chocolate")             ;  newname="chocolate"             ;  r=210  ;  g=105  ;  b=30
   CASE("100", "firebrick")             ;  newname="firebrick"             ;  r=178  ;  g=34   ;  b=34
   CASE("101", "brown")                 ;  newname="brown"                 ;  r=165  ;  g=42   ;  b=42
   CASE("102", "darksalmon")            ;  newname="darksalmon"            ;  r=233  ;  g=150  ;  b=122
   CASE("103", "salmon")                ;  newname="salmon"                ;  r=250  ;  g=128  ;  b=114
   CASE("104", "lightsalmon")           ;  newname="lightsalmon"           ;  r=255  ;  g=160  ;  b=122
   CASE("105", "orange")                ;  newname="orange"                ;  r=255  ;  g=165  ;  b=0
   CASE("106", "darkorange")            ;  newname="darkorange"            ;  r=255  ;  g=140  ;  b=0
   CASE("107", "coral")                 ;  newname="coral"                 ;  r=255  ;  g=127  ;  b=80
   CASE("108", "lightcoral")            ;  newname="lightcoral"            ;  r=240  ;  g=128  ;  b=128
   CASE("109", "tomato")                ;  newname="tomato"                ;  r=255  ;  g=99   ;  b=71
   CASE("110", "orangered")             ;  newname="orangered"             ;  r=255  ;  g=69   ;  b=0
   CASE("111", "red")                   ;  newname="red"                   ;  r=255  ;  g=0    ;  b=0
   CASE("116", "palevioletred")         ;  newname="palevioletred"         ;  r=219  ;  g=112  ;  b=147
   CASE("117", "maroon")                ;  newname="maroon"                ;  r=176  ;  g=48   ;  b=96
   CASE("118", "mediumvioletred")       ;  newname="mediumvioletred"       ;  r=199  ;  g=21   ;  b=133
   CASE("119", "violetred")             ;  newname="violetred"             ;  r=208  ;  g=32   ;  b=144
   CASE("120", "magenta")               ;  newname="magenta"               ;  r=255  ;  g=0    ;  b=255
   CASE("121", "violet")                ;  newname="violet"                ;  r=238  ;  g=130  ;  b=238
   CASE("122", "plum")                  ;  newname="plum"                  ;  r=221  ;  g=160  ;  b=221
   CASE("123", "orchid")                ;  newname="orchid"                ;  r=218  ;  g=112  ;  b=214
   CASE("124", "mediumorchid")          ;  newname="mediumorchid"          ;  r=186  ;  g=85   ;  b=211
   CASE("125", "darkorchid")            ;  newname="darkorchid"            ;  r=153  ;  g=50   ;  b=204
   CASE("126", "darkviolet")            ;  newname="darkviolet"            ;  r=148  ;  g=0    ;  b=211
   CASE("127", "blueviolet")            ;  newname="blueviolet"            ;  r=138  ;  g=43   ;  b=226
   CASE("128", "purple")                ;  newname="purple"                ;  r=160  ;  g=32   ;  b=240
   CASE("129", "mediumpurple")          ;  newname="mediumpurple"          ;  r=147  ;  g=112  ;  b=219
   CASE("130", "thistle")               ;  newname="thistle"               ;  r=216  ;  g=191  ;  b=216
   CASE("131", "snow1")                 ;  newname="snow1"                 ;  r=255  ;  g=250  ;  b=250
   CASE("132", "snow2")                 ;  newname="snow2"                 ;  r=238  ;  g=233  ;  b=233
   CASE("133", "snow3")                 ;  newname="snow3"                 ;  r=205  ;  g=201  ;  b=201
   CASE("134", "snow4")                 ;  newname="snow4"                 ;  r=139  ;  g=137  ;  b=137
   CASE("135", "seashell1")             ;  newname="seashell1"             ;  r=255  ;  g=245  ;  b=238
   CASE("136", "seashell2")             ;  newname="seashell2"             ;  r=238  ;  g=229  ;  b=222
   CASE("137", "seashell3")             ;  newname="seashell3"             ;  r=205  ;  g=197  ;  b=191
   CASE("138", "seashell4")             ;  newname="seashell4"             ;  r=139  ;  g=134  ;  b=130
   CASE("139", "antiquewhite1")         ;  newname="antiquewhite1"         ;  r=255  ;  g=239  ;  b=219
   CASE("140", "antiquewhite2")         ;  newname="antiquewhite2"         ;  r=238  ;  g=223  ;  b=204
   CASE("141", "antiquewhite3")         ;  newname="antiquewhite3"         ;  r=205  ;  g=192  ;  b=176
   CASE("142", "antiquewhite4")         ;  newname="antiquewhite4"         ;  r=139  ;  g=131  ;  b=120
   CASE("143", "bisque1")               ;  newname="bisque1"               ;  r=255  ;  g=228  ;  b=196
   CASE("144", "bisque2")               ;  newname="bisque2"               ;  r=238  ;  g=213  ;  b=183
   CASE("145", "bisque3")               ;  newname="bisque3"               ;  r=205  ;  g=183  ;  b=158
   CASE("146", "bisque4")               ;  newname="bisque4"               ;  r=139  ;  g=125  ;  b=107
   CASE("147", "peachpuff1")            ;  newname="peachpuff1"            ;  r=255  ;  g=218  ;  b=185
   CASE("148", "peachpuff2")            ;  newname="peachpuff2"            ;  r=238  ;  g=203  ;  b=173
   CASE("149", "peachpuff3")            ;  newname="peachpuff3"            ;  r=205  ;  g=175  ;  b=149
   CASE("150", "peachpuff4")            ;  newname="peachpuff4"            ;  r=139  ;  g=119  ;  b=101
   CASE("151", "navajowhite1")          ;  newname="navajowhite1"          ;  r=255  ;  g=222  ;  b=173
   CASE("152", "navajowhite2")          ;  newname="navajowhite2"          ;  r=238  ;  g=207  ;  b=161
   CASE("153", "navajowhite3")          ;  newname="navajowhite3"          ;  r=205  ;  g=179  ;  b=139
   CASE("154", "navajowhite4")          ;  newname="navajowhite4"          ;  r=139  ;  g=121  ;  b=94
   CASE("155", "lemonchiffon1")         ;  newname="lemonchiffon1"         ;  r=255  ;  g=250  ;  b=205
   CASE("156", "lemonchiffon2")         ;  newname="lemonchiffon2"         ;  r=238  ;  g=233  ;  b=191
   CASE("157", "lemonchiffon3")         ;  newname="lemonchiffon3"         ;  r=205  ;  g=201  ;  b=165
   CASE("158", "lemonchiffon4")         ;  newname="lemonchiffon4"         ;  r=139  ;  g=137  ;  b=112
   CASE("159", "cornsilk1")             ;  newname="cornsilk1"             ;  r=255  ;  g=248  ;  b=220
   CASE("160", "cornsilk2")             ;  newname="cornsilk2"             ;  r=238  ;  g=232  ;  b=205
   CASE("161", "cornsilk3")             ;  newname="cornsilk3"             ;  r=205  ;  g=200  ;  b=177
   CASE("162", "cornsilk4")             ;  newname="cornsilk4"             ;  r=139  ;  g=136  ;  b=120
   CASE("163", "ivory1")                ;  newname="ivory1"                ;  r=255  ;  g=255  ;  b=240
   CASE("164", "ivory2")                ;  newname="ivory2"                ;  r=238  ;  g=238  ;  b=224
   CASE("165", "ivory3")                ;  newname="ivory3"                ;  r=205  ;  g=205  ;  b=193
   CASE("166", "ivory4")                ;  newname="ivory4"                ;  r=139  ;  g=139  ;  b=131
   CASE("167", "honeydew1")             ;  newname="honeydew1"             ;  r=240  ;  g=255  ;  b=240
   CASE("168", "honeydew2")             ;  newname="honeydew2"             ;  r=224  ;  g=238  ;  b=224
   CASE("169", "honeydew3")             ;  newname="honeydew3"             ;  r=193  ;  g=205  ;  b=193
   CASE("170", "honeydew4")             ;  newname="honeydew4"             ;  r=131  ;  g=139  ;  b=131
   CASE("171", "lavenderblush1")        ;  newname="lavenderblush1"        ;  r=255  ;  g=240  ;  b=245
   CASE("172", "lavenderblush2")        ;  newname="lavenderblush2"        ;  r=238  ;  g=224  ;  b=229
   CASE("173", "lavenderblush3")        ;  newname="lavenderblush3"        ;  r=205  ;  g=193  ;  b=197
   CASE("174", "lavenderblush4")        ;  newname="lavenderblush4"        ;  r=139  ;  g=131  ;  b=134
   CASE("175", "mistyrose1")            ;  newname="mistyrose1"            ;  r=255  ;  g=228  ;  b=225
   CASE("176", "mistyrose2")            ;  newname="mistyrose2"            ;  r=238  ;  g=213  ;  b=210
   CASE("177", "mistyrose3")            ;  newname="mistyrose3"            ;  r=205  ;  g=183  ;  b=181
   CASE("178", "mistyrose4")            ;  newname="mistyrose4"            ;  r=139  ;  g=125  ;  b=123
   CASE("179", "azure1")                ;  newname="azure1"                ;  r=240  ;  g=255  ;  b=255
   CASE("180", "azure2")                ;  newname="azure2"                ;  r=224  ;  g=238  ;  b=238
   CASE("181", "azure3")                ;  newname="azure3"                ;  r=193  ;  g=205  ;  b=205
   CASE("182", "azure4")                ;  newname="azure4"                ;  r=131  ;  g=139  ;  b=139
   CASE("183", "slateblue1")            ;  newname="slateblue1"            ;  r=131  ;  g=111  ;  b=255
   CASE("184", "slateblue2")            ;  newname="slateblue2"            ;  r=122  ;  g=103  ;  b=238
   CASE("185", "slateblue3")            ;  newname="slateblue3"            ;  r=105  ;  g=89   ;  b=205
   CASE("186", "slateblue4")            ;  newname="slateblue4"            ;  r=71   ;  g=60   ;  b=139
   CASE("187", "royalblue1")            ;  newname="royalblue1"            ;  r=72   ;  g=118  ;  b=255
   CASE("188", "royalblue2")            ;  newname="royalblue2"            ;  r=67   ;  g=110  ;  b=238
   CASE("189", "royalblue3")            ;  newname="royalblue3"            ;  r=58   ;  g=95   ;  b=205
   CASE("190", "royalblue4")            ;  newname="royalblue4"            ;  r=39   ;  g=64   ;  b=139
   CASE("191", "blue1")                 ;  newname="blue1"                 ;  r=0    ;  g=0    ;  b=255
   CASE("192", "blue2")                 ;  newname="blue2"                 ;  r=0    ;  g=0    ;  b=238
   CASE("193", "blue3")                 ;  newname="blue3"                 ;  r=0    ;  g=0    ;  b=205
   CASE("194", "blue4")                 ;  newname="blue4"                 ;  r=0    ;  g=0    ;  b=139
   CASE("195", "dodgerblue1")           ;  newname="dodgerblue1"           ;  r=30   ;  g=144  ;  b=255
   CASE("196", "dodgerblue2")           ;  newname="dodgerblue2"           ;  r=28   ;  g=134  ;  b=238
   CASE("197", "dodgerblue3")           ;  newname="dodgerblue3"           ;  r=24   ;  g=116  ;  b=205
   CASE("198", "dodgerblue4")           ;  newname="dodgerblue4"           ;  r=16   ;  g=78   ;  b=139
   CASE("199", "steelblue1")            ;  newname="steelblue1"            ;  r=99   ;  g=184  ;  b=255
   CASE("200", "steelblue2")            ;  newname="steelblue2"            ;  r=92   ;  g=172  ;  b=238
   CASE("201", "steelblue3")            ;  newname="steelblue3"            ;  r=79   ;  g=148  ;  b=205
   CASE("202", "steelblue4")            ;  newname="steelblue4"            ;  r=54   ;  g=100  ;  b=139
   CASE("203", "deepskyblue1")          ;  newname="deepskyblue1"          ;  r=0    ;  g=191  ;  b=255
   CASE("204", "deepskyblue2")          ;  newname="deepskyblue2"          ;  r=0    ;  g=178  ;  b=238
   CASE("205", "deepskyblue3")          ;  newname="deepskyblue3"          ;  r=0    ;  g=154  ;  b=205
   CASE("206", "deepskyblue4")          ;  newname="deepskyblue4"          ;  r=0    ;  g=104  ;  b=139
   CASE("207", "skyblue1")              ;  newname="skyblue1"              ;  r=135  ;  g=206  ;  b=255
   CASE("208", "skyblue2")              ;  newname="skyblue2"              ;  r=126  ;  g=192  ;  b=238
   CASE("209", "skyblue3")              ;  newname="skyblue3"              ;  r=108  ;  g=166  ;  b=205
   CASE("210", "skyblue4")              ;  newname="skyblue4"              ;  r=74   ;  g=112  ;  b=139
   CASE("211", "lightskyblue1")         ;  newname="lightskyblue1"         ;  r=176  ;  g=226  ;  b=255
   CASE("212", "lightskyblue2")         ;  newname="lightskyblue2"         ;  r=164  ;  g=211  ;  b=238
   CASE("213", "lightskyblue3")         ;  newname="lightskyblue3"         ;  r=141  ;  g=182  ;  b=205
   CASE("214", "lightskyblue4")         ;  newname="lightskyblue4"         ;  r=96   ;  g=123  ;  b=139
   CASE("215", "slategray1")            ;  newname="slategray1"            ;  r=198  ;  g=226  ;  b=255
   CASE("216", "slategray2")            ;  newname="slategray2"            ;  r=185  ;  g=211  ;  b=238
   CASE("217", "slategray3")            ;  newname="slategray3"            ;  r=159  ;  g=182  ;  b=205
   CASE("218", "slategray4")            ;  newname="slategray4"            ;  r=108  ;  g=123  ;  b=139
   CASE("219", "lightsteelblue1")       ;  newname="lightsteelblue1"       ;  r=202  ;  g=225  ;  b=255
   CASE("220", "lightsteelblue2")       ;  newname="lightsteelblue2"       ;  r=188  ;  g=210  ;  b=238
   CASE("221", "lightsteelblue3")       ;  newname="lightsteelblue3"       ;  r=162  ;  g=181  ;  b=205
   CASE("222", "lightsteelblue4")       ;  newname="lightsteelblue4"       ;  r=110  ;  g=123  ;  b=139
   CASE("223", "lightblue1")            ;  newname="lightblue1"            ;  r=191  ;  g=239  ;  b=255
   CASE("224", "lightblue2")            ;  newname="lightblue2"            ;  r=178  ;  g=223  ;  b=238
   CASE("225", "lightblue3")            ;  newname="lightblue3"            ;  r=154  ;  g=192  ;  b=205
   CASE("226", "lightblue4")            ;  newname="lightblue4"            ;  r=104  ;  g=131  ;  b=139
   CASE("227", "lightcyan1")            ;  newname="lightcyan1"            ;  r=224  ;  g=255  ;  b=255
   CASE("228", "lightcyan2")            ;  newname="lightcyan2"            ;  r=209  ;  g=238  ;  b=238
   CASE("229", "lightcyan3")            ;  newname="lightcyan3"            ;  r=180  ;  g=205  ;  b=205
   CASE("230", "lightcyan4")            ;  newname="lightcyan4"            ;  r=122  ;  g=139  ;  b=139
   CASE("231", "paleturquoise1")        ;  newname="paleturquoise1"        ;  r=187  ;  g=255  ;  b=255
   CASE("232", "paleturquoise2")        ;  newname="paleturquoise2"        ;  r=174  ;  g=238  ;  b=238
   CASE("233", "paleturquoise3")        ;  newname="paleturquoise3"        ;  r=150  ;  g=205  ;  b=205
   CASE("234", "paleturquoise4")        ;  newname="paleturquoise4"        ;  r=102  ;  g=139  ;  b=139
   CASE("235", "cadetblue1")            ;  newname="cadetblue1"            ;  r=152  ;  g=245  ;  b=255
   CASE("236", "cadetblue2")            ;  newname="cadetblue2"            ;  r=142  ;  g=229  ;  b=238
   CASE("237", "cadetblue3")            ;  newname="cadetblue3"            ;  r=122  ;  g=197  ;  b=205
   CASE("238", "cadetblue4")            ;  newname="cadetblue4"            ;  r=83   ;  g=134  ;  b=139
   CASE("239", "turquoise1")            ;  newname="turquoise1"            ;  r=0    ;  g=245  ;  b=255
   CASE("240", "turquoise2")            ;  newname="turquoise2"            ;  r=0    ;  g=229  ;  b=238
   CASE("241", "turquoise3")            ;  newname="turquoise3"            ;  r=0    ;  g=197  ;  b=205
   CASE("242", "turquoise4")            ;  newname="turquoise4"            ;  r=0    ;  g=134  ;  b=139
   CASE("243", "cyan1")                 ;  newname="cyan1"                 ;  r=0    ;  g=255  ;  b=255
   CASE("244", "cyan2")                 ;  newname="cyan2"                 ;  r=0    ;  g=238  ;  b=238
   CASE("245", "cyan3")                 ;  newname="cyan3"                 ;  r=0    ;  g=205  ;  b=205
   CASE("246", "cyan4")                 ;  newname="cyan4"                 ;  r=0    ;  g=139  ;  b=139
   CASE("247", "darkslategray1")        ;  newname="darkslategray1"        ;  r=151  ;  g=255  ;  b=255
   CASE("248", "darkslategray2")        ;  newname="darkslategray2"        ;  r=141  ;  g=238  ;  b=238
   CASE("249", "darkslategray3")        ;  newname="darkslategray3"        ;  r=121  ;  g=205  ;  b=205
   CASE("250", "darkslategray4")        ;  newname="darkslategray4"        ;  r=82   ;  g=139  ;  b=139
   CASE("251", "aquamarine1")           ;  newname="aquamarine1"           ;  r=127  ;  g=255  ;  b=212
   CASE("252", "aquamarine2")           ;  newname="aquamarine2"           ;  r=118  ;  g=238  ;  b=198
   CASE("253", "aquamarine3")           ;  newname="aquamarine3"           ;  r=102  ;  g=205  ;  b=170
   CASE("254", "aquamarine4")           ;  newname="aquamarine4"           ;  r=69   ;  g=139  ;  b=116
   CASE("255", "darkseagreen1")         ;  newname="darkseagreen1"         ;  r=193  ;  g=255  ;  b=193
   CASE("256", "darkseagreen2")         ;  newname="darkseagreen2"         ;  r=180  ;  g=238  ;  b=180
   CASE("257", "darkseagreen3")         ;  newname="darkseagreen3"         ;  r=155  ;  g=205  ;  b=155
   CASE("258", "darkseagreen4")         ;  newname="darkseagreen4"         ;  r=105  ;  g=139  ;  b=105
   CASE("259", "seagreen1")             ;  newname="seagreen1"             ;  r=84   ;  g=255  ;  b=159
   CASE("260", "seagreen2")             ;  newname="seagreen2"             ;  r=78   ;  g=238  ;  b=148
   CASE("261", "seagreen3")             ;  newname="seagreen3"             ;  r=67   ;  g=205  ;  b=128
   CASE("262", "seagreen4")             ;  newname="seagreen4"             ;  r=46   ;  g=139  ;  b=87
   CASE("263", "palegreen1")            ;  newname="palegreen1"            ;  r=154  ;  g=255  ;  b=154
   CASE("264", "palegreen2")            ;  newname="palegreen2"            ;  r=144  ;  g=238  ;  b=144
   CASE("265", "palegreen3")            ;  newname="palegreen3"            ;  r=124  ;  g=205  ;  b=124
   CASE("266", "palegreen4")            ;  newname="palegreen4"            ;  r=84   ;  g=139  ;  b=84
   CASE("267", "springgreen1")          ;  newname="springgreen1"          ;  r=0    ;  g=255  ;  b=127
   CASE("268", "springgreen2")          ;  newname="springgreen2"          ;  r=0    ;  g=238  ;  b=118
   CASE("269", "springgreen3")          ;  newname="springgreen3"          ;  r=0    ;  g=205  ;  b=102
   CASE("270", "springgreen4")          ;  newname="springgreen4"          ;  r=0    ;  g=139  ;  b=69
   CASE("271", "green1")                ;  newname="green1"                ;  r=0    ;  g=255  ;  b=0
   CASE("272", "green2")                ;  newname="green2"                ;  r=0    ;  g=238  ;  b=0
   CASE("273", "green3")                ;  newname="green3"                ;  r=0    ;  g=205  ;  b=0
   CASE("274", "green4")                ;  newname="green4"                ;  r=0    ;  g=139  ;  b=0
   CASE("275", "chartreuse1")           ;  newname="chartreuse1"           ;  r=127  ;  g=255  ;  b=0
   CASE("276", "chartreuse2")           ;  newname="chartreuse2"           ;  r=118  ;  g=238  ;  b=0
   CASE("277", "chartreuse3")           ;  newname="chartreuse3"           ;  r=102  ;  g=205  ;  b=0
   CASE("278", "chartreuse4")           ;  newname="chartreuse4"           ;  r=69   ;  g=139  ;  b=0
   CASE("279", "olivedrab1")            ;  newname="olivedrab1"            ;  r=192  ;  g=255  ;  b=62
   CASE("280", "olivedrab2")            ;  newname="olivedrab2"            ;  r=179  ;  g=238  ;  b=58
   CASE("281", "olivedrab3")            ;  newname="olivedrab3"            ;  r=154  ;  g=205  ;  b=50
   CASE("282", "olivedrab4")            ;  newname="olivedrab4"            ;  r=105  ;  g=139  ;  b=34
   CASE("283", "darkolivegreen1")       ;  newname="darkolivegreen1"       ;  r=202  ;  g=255  ;  b=112
   CASE("284", "darkolivegreen2")       ;  newname="darkolivegreen2"       ;  r=188  ;  g=238  ;  b=104
   CASE("285", "darkolivegreen3")       ;  newname="darkolivegreen3"       ;  r=162  ;  g=205  ;  b=90
   CASE("286", "darkolivegreen4")       ;  newname="darkolivegreen4"       ;  r=110  ;  g=139  ;  b=61
   CASE("287", "khaki1")                ;  newname="khaki1"                ;  r=255  ;  g=246  ;  b=143
   CASE("288", "khaki2")                ;  newname="khaki2"                ;  r=238  ;  g=230  ;  b=133
   CASE("289", "khaki3")                ;  newname="khaki3"                ;  r=205  ;  g=198  ;  b=115
   CASE("290", "khaki4")                ;  newname="khaki4"                ;  r=139  ;  g=134  ;  b=78
   CASE("291", "lightgoldenrod1")       ;  newname="lightgoldenrod1"       ;  r=255  ;  g=236  ;  b=139
   CASE("292", "lightgoldenrod2")       ;  newname="lightgoldenrod2"       ;  r=238  ;  g=220  ;  b=130
   CASE("293", "lightgoldenrod3")       ;  newname="lightgoldenrod3"       ;  r=205  ;  g=190  ;  b=112
   CASE("294", "lightgoldenrod4")       ;  newname="lightgoldenrod4"       ;  r=139  ;  g=129  ;  b=76
   CASE("295", "lightyellow1")          ;  newname="lightyellow1"          ;  r=255  ;  g=255  ;  b=224
   CASE("296", "lightyellow2")          ;  newname="lightyellow2"          ;  r=238  ;  g=238  ;  b=209
   CASE("297", "lightyellow3")          ;  newname="lightyellow3"          ;  r=205  ;  g=205  ;  b=180
   CASE("298", "lightyellow4")          ;  newname="lightyellow4"          ;  r=139  ;  g=139  ;  b=122
   CASE("299", "yellow1")               ;  newname="yellow1"               ;  r=255  ;  g=255  ;  b=0
   CASE("300", "yellow2")               ;  newname="yellow2"               ;  r=238  ;  g=238  ;  b=0
   CASE("301", "yellow3")               ;  newname="yellow3"               ;  r=205  ;  g=205  ;  b=0
   CASE("302", "yellow4")               ;  newname="yellow4"               ;  r=139  ;  g=139  ;  b=0
   CASE("303", "gold1")                 ;  newname="gold1"                 ;  r=255  ;  g=215  ;  b=0
   CASE("304", "gold2")                 ;  newname="gold2"                 ;  r=238  ;  g=201  ;  b=0
   CASE("305", "gold3")                 ;  newname="gold3"                 ;  r=205  ;  g=173  ;  b=0
   CASE("306", "gold4")                 ;  newname="gold4"                 ;  r=139  ;  g=117  ;  b=0
   CASE("307", "goldenrod1")            ;  newname="goldenrod1"            ;  r=255  ;  g=193  ;  b=37
   CASE("308", "goldenrod2")            ;  newname="goldenrod2"            ;  r=238  ;  g=180  ;  b=34
   CASE("309", "goldenrod3")            ;  newname="goldenrod3"            ;  r=205  ;  g=155  ;  b=29
   CASE("310", "goldenrod4")            ;  newname="goldenrod4"            ;  r=139  ;  g=105  ;  b=20
   CASE("311", "darkgoldenrod1")        ;  newname="darkgoldenrod1"        ;  r=255  ;  g=185  ;  b=15
   CASE("312", "darkgoldenrod2")        ;  newname="darkgoldenrod2"        ;  r=238  ;  g=173  ;  b=14
   CASE("313", "darkgoldenrod3")        ;  newname="darkgoldenrod3"        ;  r=205  ;  g=149  ;  b=12
   CASE("314", "darkgoldenrod4")        ;  newname="darkgoldenrod4"        ;  r=139  ;  g=101  ;  b=8
   CASE("315", "rosybrown1")            ;  newname="rosybrown1"            ;  r=255  ;  g=193  ;  b=193
   CASE("316", "rosybrown2")            ;  newname="rosybrown2"            ;  r=238  ;  g=180  ;  b=180
   CASE("317", "rosybrown3")            ;  newname="rosybrown3"            ;  r=205  ;  g=155  ;  b=155
   CASE("318", "rosybrown4")            ;  newname="rosybrown4"            ;  r=139  ;  g=105  ;  b=105
   CASE("319", "indianred1")            ;  newname="indianred1"            ;  r=255  ;  g=106  ;  b=106
   CASE("320", "indianred2")            ;  newname="indianred2"            ;  r=238  ;  g=99   ;  b=99
   CASE("321", "indianred3")            ;  newname="indianred3"            ;  r=205  ;  g=85   ;  b=85
   CASE("322", "indianred4")            ;  newname="indianred4"            ;  r=139  ;  g=58   ;  b=58
   CASE("323", "sienna1")               ;  newname="sienna1"               ;  r=255  ;  g=130  ;  b=71
   CASE("324", "sienna2")               ;  newname="sienna2"               ;  r=238  ;  g=121  ;  b=66
   CASE("325", "sienna3")               ;  newname="sienna3"               ;  r=205  ;  g=104  ;  b=57
   CASE("326", "sienna4")               ;  newname="sienna4"               ;  r=139  ;  g=71   ;  b=38
   CASE("327", "burlywood1")            ;  newname="burlywood1"            ;  r=255  ;  g=211  ;  b=155
   CASE("328", "burlywood2")            ;  newname="burlywood2"            ;  r=238  ;  g=197  ;  b=145
   CASE("329", "burlywood3")            ;  newname="burlywood3"            ;  r=205  ;  g=170  ;  b=125
   CASE("330", "burlywood4")            ;  newname="burlywood4"            ;  r=139  ;  g=115  ;  b=85
   CASE("331", "wheat1")                ;  newname="wheat1"                ;  r=255  ;  g=231  ;  b=186
   CASE("332", "wheat2")                ;  newname="wheat2"                ;  r=238  ;  g=216  ;  b=174
   CASE("333", "wheat3")                ;  newname="wheat3"                ;  r=205  ;  g=186  ;  b=150
   CASE("334", "wheat4")                ;  newname="wheat4"                ;  r=139  ;  g=126  ;  b=102
   CASE("335", "tan1")                  ;  newname="tan1"                  ;  r=255  ;  g=165  ;  b=79
   CASE("336", "tan2")                  ;  newname="tan2"                  ;  r=238  ;  g=154  ;  b=73
   CASE("337", "tan3")                  ;  newname="tan3"                  ;  r=205  ;  g=133  ;  b=63
   CASE("338", "tan4")                  ;  newname="tan4"                  ;  r=139  ;  g=90   ;  b=43
   CASE("339", "chocolate1")            ;  newname="chocolate1"            ;  r=255  ;  g=127  ;  b=36
   CASE("340", "chocolate2")            ;  newname="chocolate2"            ;  r=238  ;  g=118  ;  b=33
   CASE("341", "chocolate3")            ;  newname="chocolate3"            ;  r=205  ;  g=102  ;  b=29
   CASE("342", "chocolate4")            ;  newname="chocolate4"            ;  r=139  ;  g=69   ;  b=19
   CASE("343", "firebrick1")            ;  newname="firebrick1"            ;  r=255  ;  g=48   ;  b=48
   CASE("344", "firebrick2")            ;  newname="firebrick2"            ;  r=238  ;  g=44   ;  b=44
   CASE("345", "firebrick3")            ;  newname="firebrick3"            ;  r=205  ;  g=38   ;  b=38
   CASE("346", "firebrick4")            ;  newname="firebrick4"            ;  r=139  ;  g=26   ;  b=26
   CASE("347", "brown1")                ;  newname="brown1"                ;  r=255  ;  g=64   ;  b=64
   CASE("348", "brown2")                ;  newname="brown2"                ;  r=238  ;  g=59   ;  b=59
   CASE("349", "brown3")                ;  newname="brown3"                ;  r=205  ;  g=51   ;  b=51
   CASE("350", "brown4")                ;  newname="brown4"                ;  r=139  ;  g=35   ;  b=35
   CASE("351", "salmon1")               ;  newname="salmon1"               ;  r=255  ;  g=140  ;  b=105
   CASE("352", "salmon2")               ;  newname="salmon2"               ;  r=238  ;  g=130  ;  b=98
   CASE("353", "salmon3")               ;  newname="salmon3"               ;  r=205  ;  g=112  ;  b=84
   CASE("354", "salmon4")               ;  newname="salmon4"               ;  r=139  ;  g=76   ;  b=57
   CASE("355", "lightsalmon1")          ;  newname="lightsalmon1"          ;  r=255  ;  g=160  ;  b=122
   CASE("356", "lightsalmon2")          ;  newname="lightsalmon2"          ;  r=238  ;  g=149  ;  b=114
   CASE("357", "lightsalmon3")          ;  newname="lightsalmon3"          ;  r=205  ;  g=129  ;  b=98
   CASE("358", "lightsalmon4")          ;  newname="lightsalmon4"          ;  r=139  ;  g=87   ;  b=66
   CASE("359", "orange1")               ;  newname="orange1"               ;  r=255  ;  g=165  ;  b=0
   CASE("360", "orange2")               ;  newname="orange2"               ;  r=238  ;  g=154  ;  b=0
   CASE("361", "orange3")               ;  newname="orange3"               ;  r=205  ;  g=133  ;  b=0
   CASE("362", "orange4")               ;  newname="orange4"               ;  r=139  ;  g=90   ;  b=0
   CASE("363", "darkorange1")           ;  newname="darkorange1"           ;  r=255  ;  g=127  ;  b=0
   CASE("364", "darkorange2")           ;  newname="darkorange2"           ;  r=238  ;  g=118  ;  b=0
   CASE("365", "darkorange3")           ;  newname="darkorange3"           ;  r=205  ;  g=102  ;  b=0
   CASE("366", "darkorange4")           ;  newname="darkorange4"           ;  r=139  ;  g=69   ;  b=0
   CASE("367", "coral1")                ;  newname="coral1"                ;  r=255  ;  g=114  ;  b=86
   CASE("368", "coral2")                ;  newname="coral2"                ;  r=238  ;  g=106  ;  b=80
   CASE("369", "coral3")                ;  newname="coral3"                ;  r=205  ;  g=91   ;  b=69
   CASE("370", "coral4")                ;  newname="coral4"                ;  r=139  ;  g=62   ;  b=47
   CASE("371", "tomato1")               ;  newname="tomato1"               ;  r=255  ;  g=99   ;  b=71
   CASE("372", "tomato2")               ;  newname="tomato2"               ;  r=238  ;  g=92   ;  b=66
   CASE("373", "tomato3")               ;  newname="tomato3"               ;  r=205  ;  g=79   ;  b=57
   CASE("374", "tomato4")               ;  newname="tomato4"               ;  r=139  ;  g=54   ;  b=38
   CASE("375", "orangered1")            ;  newname="orangered1"            ;  r=255  ;  g=69   ;  b=0
   CASE("376", "orangered2")            ;  newname="orangered2"            ;  r=238  ;  g=64   ;  b=0
   CASE("377", "orangered3")            ;  newname="orangered3"            ;  r=205  ;  g=55   ;  b=0
   CASE("378", "orangered4")            ;  newname="orangered4"            ;  r=139  ;  g=37   ;  b=0
   CASE("379", "red1")                  ;  newname="red1"                  ;  r=255  ;  g=0    ;  b=0
   CASE("380", "red2")                  ;  newname="red2"                  ;  r=238  ;  g=0    ;  b=0
   CASE("381", "red3")                  ;  newname="red3"                  ;  r=205  ;  g=0    ;  b=0
   CASE("382", "red4")                  ;  newname="red4"                  ;  r=139  ;  g=0    ;  b=0
   CASE("112", "hotpink")               ;  newname="hotpink"               ;  r=255  ;  g=105  ;  b=180
   CASE("113", "deeppink")              ;  newname="deeppink"              ;  r=255  ;  g=20   ;  b=147
   CASE("115", "lightpink")             ;  newname="lightpink"             ;  r=255  ;  g=182  ;  b=193
   CASE("383", "deeppink1")             ;  newname="deeppink1"             ;  r=255  ;  g=20   ;  b=147
   CASE("384", "deeppink2")             ;  newname="deeppink2"             ;  r=238  ;  g=18   ;  b=137
   CASE("385", "deeppink3")             ;  newname="deeppink3"             ;  r=205  ;  g=16   ;  b=118
   CASE("386", "deeppink4")             ;  newname="deeppink4"             ;  r=139  ;  g=10   ;  b=80
   CASE("387", "hotpink1")              ;  newname="hotpink1"              ;  r=255  ;  g=110  ;  b=180
   CASE("388", "hotpink2")              ;  newname="hotpink2"              ;  r=238  ;  g=106  ;  b=167
   CASE("389", "hotpink3")              ;  newname="hotpink3"              ;  r=205  ;  g=96   ;  b=144
   CASE("390", "hotpink4")              ;  newname="hotpink4"              ;  r=139  ;  g=58   ;  b=98
   CASE("114", "pink")                  ;  newname="pink"                  ;  r=255  ;  g=192  ;  b=203
   CASE("391", "pink1")                 ;  newname="pink1"                 ;  r=255  ;  g=181  ;  b=197
   CASE("392", "pink2")                 ;  newname="pink2"                 ;  r=238  ;  g=169  ;  b=184
   CASE("393", "pink3")                 ;  newname="pink3"                 ;  r=205  ;  g=145  ;  b=158
   CASE("394", "pink4")                 ;  newname="pink4"                 ;  r=139  ;  g=99   ;  b=108
   CASE("395", "lightpink1")            ;  newname="lightpink1"            ;  r=255  ;  g=174  ;  b=185
   CASE("396", "lightpink2")            ;  newname="lightpink2"            ;  r=238  ;  g=162  ;  b=173
   CASE("397", "lightpink3")            ;  newname="lightpink3"            ;  r=205  ;  g=140  ;  b=149
   CASE("398", "lightpink4")            ;  newname="lightpink4"            ;  r=139  ;  g=95   ;  b=101
   CASE("399", "palevioletred1")        ;  newname="palevioletred1"        ;  r=255  ;  g=130  ;  b=171
   CASE("400", "palevioletred2")        ;  newname="palevioletred2"        ;  r=238  ;  g=121  ;  b=159
   CASE("401", "palevioletred3")        ;  newname="palevioletred3"        ;  r=205  ;  g=104  ;  b=137
   CASE("402", "palevioletred4")        ;  newname="palevioletred4"        ;  r=139  ;  g=71   ;  b=93
   CASE("403", "maroon1")               ;  newname="maroon1"               ;  r=255  ;  g=52   ;  b=179
   CASE("404", "maroon2")               ;  newname="maroon2"               ;  r=238  ;  g=48   ;  b=167
   CASE("405", "maroon3")               ;  newname="maroon3"               ;  r=205  ;  g=41   ;  b=144
   CASE("406", "maroon4")               ;  newname="maroon4"               ;  r=139  ;  g=28   ;  b=98
   CASE("407", "violetred1")            ;  newname="violetred1"            ;  r=255  ;  g=62   ;  b=150
   CASE("408", "violetred2")            ;  newname="violetred2"            ;  r=238  ;  g=58   ;  b=140
   CASE("409", "violetred3")            ;  newname="violetred3"            ;  r=205  ;  g=50   ;  b=120
   CASE("410", "violetred4")            ;  newname="violetred4"            ;  r=139  ;  g=34   ;  b=82
   CASE("411", "magenta1")              ;  newname="magenta1"              ;  r=255  ;  g=0    ;  b=255
   CASE("412", "magenta2")              ;  newname="magenta2"              ;  r=238  ;  g=0    ;  b=238
   CASE("413", "magenta3")              ;  newname="magenta3"              ;  r=205  ;  g=0    ;  b=205
   CASE("414", "magenta4")              ;  newname="magenta4"              ;  r=139  ;  g=0    ;  b=139
   CASE("415", "orchid1")               ;  newname="orchid1"               ;  r=255  ;  g=131  ;  b=250
   CASE("416", "orchid2")               ;  newname="orchid2"               ;  r=238  ;  g=122  ;  b=233
   CASE("417", "orchid3")               ;  newname="orchid3"               ;  r=205  ;  g=105  ;  b=201
   CASE("418", "orchid4")               ;  newname="orchid4"               ;  r=139  ;  g=71   ;  b=137
   CASE("419", "plum1")                 ;  newname="plum1"                 ;  r=255  ;  g=187  ;  b=255
   CASE("420", "plum2")                 ;  newname="plum2"                 ;  r=238  ;  g=174  ;  b=238
   CASE("421", "plum3")                 ;  newname="plum3"                 ;  r=205  ;  g=150  ;  b=205
   CASE("422", "plum4")                 ;  newname="plum4"                 ;  r=139  ;  g=102  ;  b=139
   CASE("423", "mediumorchid1")         ;  newname="mediumorchid1"         ;  r=224  ;  g=102  ;  b=255
   CASE("424", "mediumorchid2")         ;  newname="mediumorchid2"         ;  r=209  ;  g=95   ;  b=238
   CASE("425", "mediumorchid3")         ;  newname="mediumorchid3"         ;  r=180  ;  g=82   ;  b=205
   CASE("426", "mediumorchid4")         ;  newname="mediumorchid4"         ;  r=122  ;  g=55   ;  b=139
   CASE("427", "darkorchid1")           ;  newname="darkorchid1"           ;  r=191  ;  g=62   ;  b=255
   CASE("428", "darkorchid2")           ;  newname="darkorchid2"           ;  r=178  ;  g=58   ;  b=238
   CASE("429", "darkorchid3")           ;  newname="darkorchid3"           ;  r=154  ;  g=50   ;  b=205
   CASE("430", "darkorchid4")           ;  newname="darkorchid4"           ;  r=104  ;  g=34   ;  b=139
   CASE("431", "purple1")               ;  newname="purple1"               ;  r=155  ;  g=48   ;  b=255
   CASE("432", "purple2")               ;  newname="purple2"               ;  r=145  ;  g=44   ;  b=238
   CASE("433", "purple3")               ;  newname="purple3"               ;  r=125  ;  g=38   ;  b=205
   CASE("434", "purple4")               ;  newname="purple4"               ;  r=85   ;  g=26   ;  b=139
   CASE("435", "mediumpurple1")         ;  newname="mediumpurple1"         ;  r=171  ;  g=130  ;  b=255
   CASE("436", "mediumpurple2")         ;  newname="mediumpurple2"         ;  r=159  ;  g=121  ;  b=238
   CASE("437", "mediumpurple3")         ;  newname="mediumpurple3"         ;  r=137  ;  g=104  ;  b=205
   CASE("438", "mediumpurple4")         ;  newname="mediumpurple4"         ;  r=93   ;  g=71   ;  b=139
   CASE("439", "thistle1")              ;  newname="thistle1"              ;  r=255  ;  g=225  ;  b=255
   CASE("440", "thistle2")              ;  newname="thistle2"              ;  r=238  ;  g=210  ;  b=238
   CASE("441", "thistle3")              ;  newname="thistle3"              ;  r=205  ;  g=181  ;  b=205
   CASE("442", "thistle4")              ;  newname="thistle4"              ;  r=139  ;  g=123  ;  b=139
   CASE("443", "gray0")                 ;  newname="gray0"                 ;  r=0    ;  g=0    ;  b=0
   CASE("444", "gray1")                 ;  newname="gray1"                 ;  r=3    ;  g=3    ;  b=3
   CASE("445", "gray2")                 ;  newname="gray2"                 ;  r=5    ;  g=5    ;  b=5
   CASE("446", "gray3")                 ;  newname="gray3"                 ;  r=8    ;  g=8    ;  b=8
   CASE("447", "gray4")                 ;  newname="gray4"                 ;  r=10   ;  g=10   ;  b=10
   CASE("448", "gray5")                 ;  newname="gray5"                 ;  r=13   ;  g=13   ;  b=13
   CASE("449", "gray6")                 ;  newname="gray6"                 ;  r=15   ;  g=15   ;  b=15
   CASE("450", "gray7")                 ;  newname="gray7"                 ;  r=18   ;  g=18   ;  b=18
   CASE("451", "gray8")                 ;  newname="gray8"                 ;  r=20   ;  g=20   ;  b=20
   CASE("452", "gray9")                 ;  newname="gray9"                 ;  r=23   ;  g=23   ;  b=23
   CASE("453", "gray10")                ;  newname="gray10"                ;  r=26   ;  g=26   ;  b=26
   CASE("454", "gray11")                ;  newname="gray11"                ;  r=28   ;  g=28   ;  b=28
   CASE("455", "gray12")                ;  newname="gray12"                ;  r=31   ;  g=31   ;  b=31
   CASE("456", "gray13")                ;  newname="gray13"                ;  r=33   ;  g=33   ;  b=33
   CASE("457", "gray14")                ;  newname="gray14"                ;  r=36   ;  g=36   ;  b=36
   CASE("458", "gray15")                ;  newname="gray15"                ;  r=38   ;  g=38   ;  b=38
   CASE("459", "gray16")                ;  newname="gray16"                ;  r=41   ;  g=41   ;  b=41
   CASE("460", "gray17")                ;  newname="gray17"                ;  r=43   ;  g=43   ;  b=43
   CASE("461", "gray18")                ;  newname="gray18"                ;  r=46   ;  g=46   ;  b=46
   CASE("462", "gray19")                ;  newname="gray19"                ;  r=48   ;  g=48   ;  b=48
   CASE("463", "gray20")                ;  newname="gray20"                ;  r=51   ;  g=51   ;  b=51
   CASE("464", "gray21")                ;  newname="gray21"                ;  r=54   ;  g=54   ;  b=54
   CASE("465", "gray22")                ;  newname="gray22"                ;  r=56   ;  g=56   ;  b=56
   CASE("466", "gray23")                ;  newname="gray23"                ;  r=59   ;  g=59   ;  b=59
   CASE("467", "gray24")                ;  newname="gray24"                ;  r=61   ;  g=61   ;  b=61
   CASE("468", "gray25")                ;  newname="gray25"                ;  r=64   ;  g=64   ;  b=64
   CASE("469", "gray26")                ;  newname="gray26"                ;  r=66   ;  g=66   ;  b=66
   CASE("470", "gray27")                ;  newname="gray27"                ;  r=69   ;  g=69   ;  b=69
   CASE("471", "gray28")                ;  newname="gray28"                ;  r=71   ;  g=71   ;  b=71
   CASE("472", "gray29")                ;  newname="gray29"                ;  r=74   ;  g=74   ;  b=74
   CASE("473", "gray30")                ;  newname="gray30"                ;  r=77   ;  g=77   ;  b=77
   CASE("474", "gray31")                ;  newname="gray31"                ;  r=79   ;  g=79   ;  b=79
   CASE("475", "gray32")                ;  newname="gray32"                ;  r=82   ;  g=82   ;  b=82
   CASE("476", "gray33")                ;  newname="gray33"                ;  r=84   ;  g=84   ;  b=84
   CASE("477", "gray34")                ;  newname="gray34"                ;  r=87   ;  g=87   ;  b=87
   CASE("478", "gray35")                ;  newname="gray35"                ;  r=89   ;  g=89   ;  b=89
   CASE("479", "gray36")                ;  newname="gray36"                ;  r=92   ;  g=92   ;  b=92
   CASE("480", "gray37")                ;  newname="gray37"                ;  r=94   ;  g=94   ;  b=94
   CASE("481", "gray38")                ;  newname="gray38"                ;  r=97   ;  g=97   ;  b=97
   CASE("482", "gray39")                ;  newname="gray39"                ;  r=99   ;  g=99   ;  b=99
   CASE("483", "gray40")                ;  newname="gray40"                ;  r=102  ;  g=102  ;  b=102
   CASE("484", "gray41")                ;  newname="gray41"                ;  r=105  ;  g=105  ;  b=105
   CASE("485", "gray42")                ;  newname="gray42"                ;  r=107  ;  g=107  ;  b=107
   CASE("486", "gray43")                ;  newname="gray43"                ;  r=110  ;  g=110  ;  b=110
   CASE("487", "gray44")                ;  newname="gray44"                ;  r=112  ;  g=112  ;  b=112
   CASE("488", "gray45")                ;  newname="gray45"                ;  r=115  ;  g=115  ;  b=115
   CASE("489", "gray46")                ;  newname="gray46"                ;  r=117  ;  g=117  ;  b=117
   CASE("490", "gray47")                ;  newname="gray47"                ;  r=120  ;  g=120  ;  b=120
   CASE("491", "gray48")                ;  newname="gray48"                ;  r=122  ;  g=122  ;  b=122
   CASE("492", "gray49")                ;  newname="gray49"                ;  r=125  ;  g=125  ;  b=125
   CASE("493", "gray50")                ;  newname="gray50"                ;  r=127  ;  g=127  ;  b=127
   CASE("494", "gray51")                ;  newname="gray51"                ;  r=130  ;  g=130  ;  b=130
   CASE("495", "gray52")                ;  newname="gray52"                ;  r=133  ;  g=133  ;  b=133
   CASE("496", "gray53")                ;  newname="gray53"                ;  r=135  ;  g=135  ;  b=135
   CASE("497", "gray54")                ;  newname="gray54"                ;  r=138  ;  g=138  ;  b=138
   CASE("498", "gray55")                ;  newname="gray55"                ;  r=140  ;  g=140  ;  b=140
   CASE("499", "gray56")                ;  newname="gray56"                ;  r=143  ;  g=143  ;  b=143
   CASE("500", "gray57")                ;  newname="gray57"                ;  r=145  ;  g=145  ;  b=145
   CASE("501", "gray58")                ;  newname="gray58"                ;  r=148  ;  g=148  ;  b=148
   CASE("502", "gray59")                ;  newname="gray59"                ;  r=150  ;  g=150  ;  b=150
   CASE("503", "gray60")                ;  newname="gray60"                ;  r=153  ;  g=153  ;  b=153
   CASE("504", "gray61")                ;  newname="gray61"                ;  r=156  ;  g=156  ;  b=156
   CASE("505", "gray62")                ;  newname="gray62"                ;  r=158  ;  g=158  ;  b=158
   CASE("506", "gray63")                ;  newname="gray63"                ;  r=161  ;  g=161  ;  b=161
   CASE("507", "gray64")                ;  newname="gray64"                ;  r=163  ;  g=163  ;  b=163
   CASE("508", "gray65")                ;  newname="gray65"                ;  r=166  ;  g=166  ;  b=166
   CASE("509", "gray66")                ;  newname="gray66"                ;  r=168  ;  g=168  ;  b=168
   CASE("510", "gray67")                ;  newname="gray67"                ;  r=171  ;  g=171  ;  b=171
   CASE("511", "gray68")                ;  newname="gray68"                ;  r=173  ;  g=173  ;  b=173
   CASE("512", "gray69")                ;  newname="gray69"                ;  r=176  ;  g=176  ;  b=176
   CASE("513", "gray70")                ;  newname="gray70"                ;  r=179  ;  g=179  ;  b=179
   CASE("514", "gray71")                ;  newname="gray71"                ;  r=181  ;  g=181  ;  b=181
   CASE("515", "gray72")                ;  newname="gray72"                ;  r=184  ;  g=184  ;  b=184
   CASE("516", "gray73")                ;  newname="gray73"                ;  r=186  ;  g=186  ;  b=186
   CASE("517", "gray74")                ;  newname="gray74"                ;  r=189  ;  g=189  ;  b=189
   CASE("518", "gray75")                ;  newname="gray75"                ;  r=191  ;  g=191  ;  b=191
   CASE("519", "gray76")                ;  newname="gray76"                ;  r=194  ;  g=194  ;  b=194
   CASE("520", "gray77")                ;  newname="gray77"                ;  r=196  ;  g=196  ;  b=196
   CASE("521", "gray78")                ;  newname="gray78"                ;  r=199  ;  g=199  ;  b=199
   CASE("522", "gray79")                ;  newname="gray79"                ;  r=201  ;  g=201  ;  b=201
   CASE("523", "gray80")                ;  newname="gray80"                ;  r=204  ;  g=204  ;  b=204
   CASE("524", "gray81")                ;  newname="gray81"                ;  r=207  ;  g=207  ;  b=207
   CASE("525", "gray82")                ;  newname="gray82"                ;  r=209  ;  g=209  ;  b=209
   CASE("526", "gray83")                ;  newname="gray83"                ;  r=212  ;  g=212  ;  b=212
   CASE("527", "gray84")                ;  newname="gray84"                ;  r=214  ;  g=214  ;  b=214
   CASE("528", "gray85")                ;  newname="gray85"                ;  r=217  ;  g=217  ;  b=217
   CASE("529", "gray86")                ;  newname="gray86"                ;  r=219  ;  g=219  ;  b=219
   CASE("530", "gray87")                ;  newname="gray87"                ;  r=222  ;  g=222  ;  b=222
   CASE("531", "gray88")                ;  newname="gray88"                ;  r=224  ;  g=224  ;  b=224
   CASE("532", "gray89")                ;  newname="gray89"                ;  r=227  ;  g=227  ;  b=227
   CASE("533", "gray90")                ;  newname="gray90"                ;  r=229  ;  g=229  ;  b=229
   CASE("534", "gray91")                ;  newname="gray91"                ;  r=232  ;  g=232  ;  b=232
   CASE("535", "gray92")                ;  newname="gray92"                ;  r=235  ;  g=235  ;  b=235
   CASE("536", "gray93")                ;  newname="gray93"                ;  r=237  ;  g=237  ;  b=237
   CASE("537", "gray94")                ;  newname="gray94"                ;  r=240  ;  g=240  ;  b=240
   CASE("538", "gray95")                ;  newname="gray95"                ;  r=242  ;  g=242  ;  b=242
   CASE("539", "gray96")                ;  newname="gray96"                ;  r=245  ;  g=245  ;  b=245
   CASE("540", "gray97")                ;  newname="gray97"                ;  r=247  ;  g=247  ;  b=247
   CASE("541", "gray98")                ;  newname="gray98"                ;  r=250  ;  g=250  ;  b=250
   CASE("542", "gray99")                ;  newname="gray99"                ;  r=252  ;  g=252  ;  b=252
   CASE("543", "gray100")               ;  newname="gray100"               ;  r=255  ;  g=255  ;  b=255
   CASE("544", "darkgray")              ;  newname="darkgray"              ;  r=169  ;  g=169  ;  b=169
   CASE("545", "darkblue")              ;  newname="darkblue"              ;  r=0    ;  g=0    ;  b=139
   CASE("546", "darkcyan")              ;  newname="darkcyan"              ;  r=0    ;  g=139  ;  b=139
   CASE("547", "darkmagenta")           ;  newname="darkmagenta"           ;  r=139  ;  g=0    ;  b=139
   CASE("548", "darkred")               ;  newname="darkred"               ;  r=139  ;  g=0    ;  b=0
   CASE("549", "lightgreen")            ;  newname="lightgreen"            ;  r=144  ;  g=238  ;  b=144
   CASE("550", "silver")                ;  newname="silver"                ;  r=192  ;  g=192  ;  b=192
   CASE("551", "teal")                  ;  newname="teal"                  ;  r=0    ;  g=128  ;  b=128
   CASE("552", "olive")                 ;  newname="olive"                 ;  r=128  ;  g=128  ;  b=0
   CASE("553", "lime")                  ;  newname="lime"                  ;  r=0    ;  g=255  ;  b=0
   CASE("554", "aqua")                  ;  newname="aqua"                  ;  r=0    ;  g=255  ;  b=255
   CASE("555", "fuchsia")               ;  newname="fuchsia"               ;  r=255  ;  g=0    ;  b=255

   case default                         ;  newname="Unknown"               ;  r=255  ;  g=255  ;  b=255 ! unknown color name

   END SELECT

   IF(PRESENT(echoname)) THEN
      echoname = newname
   ENDIF
   r=r/2.55; g=g/2.55; b=b/2.55 ! take values from range of 0 to 255 to 0 to 100
END SUBROUTINE color_name2rgb