grfColor Values
Use the enumeration [grfColorRed], 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, but are not supported by Scripter.
Value
Enumeration |
Color |
RGB Value |
Hex Triplet |
grfColorBlack |
|
0,0,0 |
#000000 |
grfColorBlack90 |
|
25,25,25 |
#191919 |
grfColorBlack80 |
|
51,51,51 |
#333333 |
grfColorBlack70 |
|
77,77,77 |
#4D4D4D |
grfColorBlack60 |
|
102,102,102 |
#666666 |
grfColorBlack50 |
|
128,128,128 |
#808080 |
grfColorBlack40 |
|
153,153,153 |
#999999 |
grfColorBlack30 |
|
179,179,179 |
#B3B3B3 |
grfColorBlack20 |
|
204,204,204 |
#CCCCCC |
grfColorBlack10 |
|
230,230,230 |
#E6E6E6 |
grfColorWhite |
|
255,255,255 |
#FFFFFF |
grfColorBlue |
|
0,0,255 |
#0000FF |
grfColorCyan |
|
0,255,255 |
#00FFFF |
grfColorGreen |
|
0,255,0 |
#00FF00 |
grfColorYellow |
|
255,255,0 |
#FFFF00 |
grfColorRed |
|
255,0,0 |
#FF0000 |
grfColorMagenta |
|
255,0,255 |
#FF00FF |
grfColorPurple |
|
153,0,204 |
#9900CC |
grfColorOrange |
|
255,102,0 |
#FF6600 |
grfColorPink |
|
255,153,204 |
#FF99CC |
grfColorDarkBrown |
|
102,51,51 |
#663333 |
grfColorPowderBlue |
|
204,204,255 |
#CCCCFF |
grfColorPastelBlue |
|
153,153,255 |
#9999FF |
grfColorBabyBlue |
|
102,153,255 |
#6699FF |
grfColorElectricBlue |
|
102,102,255 |
#6666FF |
grfColorTwilightBlue |
|
102,102,204 |
#6666CC |
grfColorNavyBlue |
|
0,51,153 |
#003399 |
grfColorDeepNavyBlue |
|
0,0,102 |
#000066 |
grfColorDesertBlue |
|
51,102,153 |
#336699 |
grfColorSkyBlue |
|
0,204,255 |
#00CCFF |
grfColorIceBlue |
|
153,255,255 |
#99FFFF |
grfColorLightBlueGreen |
|
153,204,204 |
#99CCCC |
grfColorOceanGreen |
|
102,153,153 |
#669999 |
grfColorMossGreen |
|
51,102,102 |
#346666 |
grfColorDarkGreen |
|
0,51,51 |
#003333 |
grfColorForestGreen |
|
0,102,51 |
#006633 |
grfColorDarkBlueGreen |
|
0,128,0 |
#008000 |
grfColorGrassGreen |
|
0,153,51 |
#009933 |
grfColorKentuckyGreen |
|
51,153,102 |
#339966 |
grfColorLightGreen |
|
51,204,102 |
#33CC66 |
grfColorSpringGreen |
|
51,204,51 |
#33CC33 |
grfColorTurquoise |
|
102,255,204 |
#66FFCC |
grfColorSeaGreen |
|
51,204,153 |
#33CC99 |
grfColorFadedGreen |
|
153,204,153 |
#99CC99 |
grfColorGhostGreen |
|
204,255,204 |
#CCFFCC |
grfColorMintGreen |
|
153,255,153 |
#99FF99 |
grfColorArmyGreen |
|
102,153,102 |
#669966 |
grfColorAvocadoGreen |
|
102,153,51 |
#669933 |
grfColorMartianGreen |
|
153,204,51 |
#99CC33 |
grfColorDullGreen |
|
153,204,102 |
#99CC66 |
grfColorChartreuse |
|
153,255,0 |
#99FF00 |
grfColorMoonGreen |
|
204,255,102 |
#CCFF66 |
grfColorMurkyGreen |
|
51,51,0 |
#333300 |
grfColorOliveDrab |
|
102,102,51 |
#666633 |
grfColorKhaki |
|
153,153,102 |
#999966 |
grfColorOlive |
|
153,153,51 |
#999933 |
grfColorBananaYellow |
|
204,204,51 |
#CCCC33 |
grfColorLightYellow |
|
255,255,102 |
#FFFF66 |
grfColorChalk |
|
255,255,153 |
#FFFF99 |
grfColorPaleYellow |
|
255,255,204 |
#FFFFCC |
grfColorBrown |
|
153,102,51 |
#996633 |
grfColorRedBrown |
|
204,102,51 |
#CC6633 |
grfColorGold |
|
204,153,51 |
#CC9933 |
grfColorAutumnOrange |
|
255,102,51 |
#FF6633 |
grfColorLightOrange |
|
255,153,51 |
#FF9933 |
grfColorPeach |
|
255,153,102 |
#FF9966 |
grfColorDeepYellow |
|
255,204,0 |
#FFCC00 |
grfColorSand |
|
255,204,153 |
#FFCC99 |
grfColorWalnut |
|
102,51,0 |
#663300 |
grfColorRubyRed |
|
153,0,0 |
#990000 |
grfColorBrickRed |
|
204,51,0 |
#CC3300 |
grfColorTropicalPink |
|
255,102,102 |
#FF6666 |
grfColorSoftPink |
|
255,153,153 |
#FF9999 |
grfColorFadedPink |
|
255,204,204 |
#FFCCCC |
grfColorDarkRed |
|
128,0,0 |
#800000 |
grfColorCrimson |
|
153,51,102 |
#993366 |
grfColorRegalRed |
|
204,51,102 |
#CC3366 |
grfColorDeepRose |
|
204,51,153 |
#CC3399 |
grfColorNeonRed |
|
255,0,102 |
#FF0066 |
grfColorDeepPink |
|
255,102,153 |
#FF6699 |
grfColorHotPink |
|
255,51,153 |
#FF3399 |
grfColorDustyRose |
|
204,102,153 |
#CC6699 |
grfColorPlum |
|
102,0,102 |
#660066 |
grfColorDeepViolet |
|
153,0,153 |
#990099 |
grfColorLightViolet |
|
255,153,255 |
#FF99FF |
grfColorViolet |
|
204,102,204 |
#CC66CC |
grfColorDustyPlum |
|
153,102,153 |
#996699 |
grfColorPalePurple |
|
204,153,204 |
#CC99CC |
grfColorMajesticPurple |
|
153,51,204 |
#9933CC |
grfColorNeonPurple |
|
204,51,255 |
#CC33FF |
grfColorLightPurple |
|
204,102,255 |
#CC66FF |
grfColorTwilightViolet |
|
153,102,204 |
#9966CC |
grfColorEasterPurple |
|
204,153,255 |
#CC99FF |
grfColorDeepPurple |
|
51,0,102 |
#330066 |
grfColorGrape |
|
102,51,153 |
#663399 |
grfColorBlueViolet |
|
153,102,255 |
#9966FF |
grfColorBluePurple |
|
153,0,255 |
#9900FF |
grfColorDeepRiver |
|
102,0,204 |
#6600CC |
grfColorDeepAzure |
|
102,51,255 |
#C933FF |
grfColorStormBlue |
|
51,0,153 |
#330099 |
grfColorDeepBlue |
|
51,0,204 |
#3300CC |
grfColorDarkBlue |
|
0,0,128 |
#000080 |