Is there some kind of color reference table for values?

  • Thread starter Thread starter Craig Armitage
  • Start date Start date
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
 
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]
 
so can i specify the number as hex in code? That would make it easier to
create colors
 
What I normally do to select a color is to use the Access built-in
Color Picker. Just add a temporary Text box to your form (or use an
existing one), click on the BackColor property and click the button
with the three dots. Select a color from the Color dialogue (click the
Define Custom Colors button to see all the colors), click the Add to
Custom Colors button and then click OK. You can then use the number
that Access returns in the Text box BackColor property as the number
in the Constant definition in code.

HTH

Peter Hibbs.
 
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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top