# SrfColor Values

Use the enumeration [srfColorRed], or the component of an RGB value [RGB(255,0,0)] to set a color. The RGB(red,green,blue) function converts three-component RGB values into an Access color value. The Access color value is returned by Scripter. The following example can be used to convert Access values to RGB values:

'get the fill forecolor Access color value of a shape

color = shapes.Item(1).Fill.ForeColor

'determine the RGB values from the Access value

b = color\65536

g = (color - b*65536)\256

r = color - g*256 - b*65536

'display the RGB values in the immediate window

Debug .Print "R" + r + " G" + g + " B" + b

Note: The Hex Triplets are valid for HTML and are supported by Scripter with this simple conversion:

1. Remove the hashtag from the beginning of the Hex Tripletand replace it with an ampersand (&) and the letter H.
2. Swap the first letter and number in series with the last number and letter, keeping the same order.

For example, the Hex Triplet #C933FF becomes &HFF33C9 for use in Scripter.

 Enumeration Color RGB Value Hex Triplet srfColorBlack 0,0,0 #000000 srfColorBlack90 25,25,25 #191919 srfColorBlack80 51,51,51 #333333 srfColorBlack70 77,77,77 #4D4D4D srfColorBlack60 102,102,102 #666666 srfColorBlack50 128,128,128 #808080 srfColorBlack40 153,153,153 #999999 srfColorBlack30 179,179,179 #B3B3B3 srfColorBlack20 204,204,204 #CCCCCC srfColorBlack10 230,230,230 #E6E6E6 srfColorWhite 255,255,255 #FFFFFF srfColorBlue 0,0,255 #0000FF srfColorCyan 0,255,255 #00FFFF srfColorGreen 0,255,0 #00FF00 srfColorYellow 255,255,0 #FFFF00 srfColorRed 255,0,0 #FF0000 srfColorMagenta 255,0,255 #FF00FF srfColorPurple 153,0,204 #9900CC srfColorOrange 255,102,0 #FF6600 srfColorPink 255,153,204 #FF99CC srfColorDarkBrown 102,51,51 #663333 srfColorPowderBlue 204,204,255 #CCCCFF srfColorPastelBlue 153,153,255 #9999FF srfColorBabyBlue 102,153,255 #6699FF srfColorElectricBlue 102,102,255 #6666FF srfColorTwilightBlue 102,102,204 #6666CC srfColorNavyBlue 0,51,153 #003399 srfColorDeepNavyBlue 0,0,102 #000066 srfColorDesertBlue 51,102,153 #336699 srfColorSkyBlue 0,204,255 #00CCFF srfColorIceBlue 153,255,255 #99FFFF srfColorLightBlueGreen 153,204,204 #99CCCC srfColorOceanGreen 102,153,153 #669999 srfColorMossGreen 51,102,102 #346666 srfColorDarkGreen 0,51,51 #003333 srfColorForestGreen 0,102,51 #006633 srfColorDarkBlueGreen 0,128,0 #008000 srfColorGrassGreen 0,153,51 #009933 srfColorKentuckyGreen 51,153,102 #339966 srfColorLightGreen 51,204,102 #33CC66 srfColorSpringGreen 51,204,51 #33CC33 srfColorTurquoise 102,255,204 #66FFCC srfColorSeaGreen 51,204,153 #33CC99 srfColorFadedGreen 153,204,153 #99CC99 srfColorGhostGreen 204,255,204 #CCFFCC srfColorMintGreen 153,255,153 #99FF99 srfColorArmyGreen 102,153,102 #669966 srfColorAvocadoGreen 102,153,51 #669933 srfColorMartianGreen 153,204,51 #99CC33 srfColorDullGreen 153,204,102 #99CC66 srfColorChartreuse 153,255,0 #99FF00 srfColorMoonGreen 204,255,102 #CCFF66 srfColorMurkyGreen 51,51,0 #333300 srfColorOliveDrab 102,102,51 #666633 srfColorKhaki 153,153,102 #999966 srfColorOlive 153,153,51 #999933 srfColorBananaYellow 204,204,51 #CCCC33 srfColorLightYellow 255,255,102 #FFFF66 srfColorChalk 255,255,153 #FFFF99 srfColorPaleYellow 255,255,204 #FFFFCC srfColorBrown 153,102,51 #996633 srfColorRedBrown 204,102,51 #CC6633 srfColorGold 204,153,51 #CC9933 srfColorAutumnOrange 255,102,51 #FF6633 srfColorLightOrange 255,153,51 #FF9933 srfColorPeach 255,153,102 #FF9966 srfColorDeepYellow 255,204,0 #FFCC00 srfColorSand 255,204,153 #FFCC99 srfColorWalnut 102,51,0 #663300 srfColorRubyRed 153,0,0 #990000 srfColorBrickRed 204,51,0 #CC3300 srfColorTropicalPink 255,102,102 #FF6666 srfColorSoftPink 255,153,153 #FF9999 srfColorFadedPink 255,204,204 #FFCCCC srfColorDarkRed 128,0,0 #800000 srfColorCrimson 153,51,102 #993366 srfColorRegalRed 204,51,102 #CC3366 srfColorDeepRose 204,51,153 #CC3399 srfColorNeonRed 255,0,102 #FF0066 srfColorDeepPink 255,102,153 #FF6699 srfColorHotPink 255,51,153 #FF3399 srfColorDustyRose 204,102,153 #CC6699 srfColorPlum 102,0,102 #660066 srfColorDeepViolet 153,0,153 #990099 srfColorLightViolet 255,153,255 #FF99FF srfColorViolet 204,102,204 #CC66CC srfColorDustyPlum 153,102,153 #996699 srfColorPalePurple 204,153,204 #CC99CC srfColorMajesticPurple 153,51,204 #9933CC srfColorNeonPurple 204,51,255 #CC33FF srfColorLightPurple 204,102,255 #CC66FF srfColorTwilightViolet 153,102,204 #9966CC srfColorEasterPurple 204,153,255 #CC99FF srfColorDeepPurple 51,0,102 #330066 srfColorGrape 102,51,153 #663399 srfColorBlueViolet 153,102,255 #9966FF srfColorBluePurple 153,0,255 #9900FF srfColorDeepRiver 102,0,204 #6600CC srfColorDeepAzure 102,51,255 #C933FF srfColorStormBlue 51,0,153 #330099 srfColorDeepBlue 51,0,204 #3300CC srfColorDarkBlue 0,0,128 #000080