Web Color Scripting

1. Javascript strings

Colors on the web are expressed as string values, either as a common color name, or as a triplet of values that signify the amounts of red, green and blue in the color. These are all valid ways to indicate the same color:

Color Values
Name RGB Hex
yellowrgb(255,255,0)#ffff00
whitergb(255,255,255)#ffffff
tealrgb(0,128,128)#008080
silverrgb(192,192,192)#c0c0c0
redrgb(255,0,0)#ff0000
purplergb(128,0,128)#800080
olivergb(128,128,0)#808000
navyrgb(0,0,128)#000080
maroonrgb(128,0,0)#800000
limergb(0,255,0)#00ff00
greenrgb(0,128,0)#008000
grayrgb(128,128,128)#808080
fuchsiargb(255,0,255)#ff00ff
bluergb(0,0,255)#0000ff
blackrgb(0,0,0)#000000
aquargb(0,255,255)#00ffff