Is there some kind of color reference table for values?

C

Craig Armitage

Hi,

Im using a flexgrid that lets me set fillcolors etc...

i saw some code that defined some colors but i wanted to know if there was a
chart so i can figure out my own colour schemes..

the code was...

Const conCream As Long = 13303807
Const conNavy As Long = 8404992
Const conPaleGreen As Long = 13434828
Const conLightBlue As Long = 16760445

thanks
 
J

John W. Vinson

Hi,

Im using a flexgrid that lets me set fillcolors etc...

i saw some code that defined some colors but i wanted to know if there was a
chart so i can figure out my own colour schemes..

the code was...

Const conCream As Long = 13303807
Const conNavy As Long = 8404992
Const conPaleGreen As Long = 13434828
Const conLightBlue As Long = 16760445

thanks

There's a logic, if not a chart. The numbers can be expressed in hexadecimal
format: e.g. 8404992 is x'804000'. You can then split this number up into
three two-digit numbers - 80, 40 and 0. Each number represents one color -
blue, green, and red respectively. Each color ranges from 00 (e.g. conNavy has
no red in it at all) to FF (FF0000 would be fully saturated blue).

You can see "Color Constants" Help in the Object browser, or just define your
own constants; just remember that 000000 is pure black (absence of all
colors), FFFFFF is brightest white (all three primary colors blended), and
every other color is somewhere in between.

John W. Vinson [MVP]
 
C

Craig Armitage

so can i specify the number as hex in code? That would make it easier to
create colors
 
J

John W. Vinson

so can i specify the number as hex in code? That would make it easier to
create colors

I'd use the color picker as suggested, but yes you could; e.g. you could use
three integers, iBlue, iGreen, iRed, values 0 through 255; and generate iColor
using

iColor = iBlue * 65536 + iGreen * 256 + iRed


John W. Vinson [MVP]
 
Top