Can someone point me at a location of where I could find a chart showing which colors match which color codes that are used by VB?
&H00000000& = Black.
Preferably the chart has a few more colors than the 48 colors in the color palette.
Printable View
Can someone point me at a location of where I could find a chart showing which colors match which color codes that are used by VB?
&H00000000& = Black.
Preferably the chart has a few more colors than the 48 colors in the color palette.
Open up your Object Browser in the VB IDE (Press F2) and search for vbBlack. The constants will all be listed out with their hex color codes but constant values are easier to work with.
If you are familiar with RGB values, and can convert the 0-255 decimal values into two-character hex values, then this may be helpful:
&H00BBGGRR&
Although thats true, why would you want to do all that extra work for determining the standard and system colors?
This sample project might be helpful to you.
Was hoping there would be a simple chart where I could look for the colour I was after and copy the colour code. The standard color palette doesn't really contain the colours I want.
I can't seem to find anything on the net which I find strange.
This:
color = RGB(255,255,0) '(r, g, b)
from the sample project does the trick for me. I just need to work out what rgb's combinations I need.
Logophobic, your's is an alternative but the above does the trick.
Thanks all!
Unless you completely control the canvas you don't want to mess around with colors.
I've seen lots of programs where somebody got "cute" with colors that looked good on his tricked out, "window-blinded" machine and were completely unreadable on a standard machine, or on XP themed machines, or when somebody chose a non-default Windows color scheme.
Yea, like with the Janus Explorer control it uses custom colouring to achieve the XP theme color but when run under Vista its all greyed out and sickly looking. They should have had it extract and link to the resource file of the theme in use etc. But thats just my opinion.
here is the basic values for rgb,
Code:Color Red Value Green Value Blue Value
Black 0 0 0
Blue 0 0 255
Green 0 255 0
Cyan 0 255 255
Red 255 0 0
Magenta 255 0 255
Yellow 255 255 0
White 255 255 255