Converting a hex color to a color (not that simple)

raredaredevil
02-02-2005, 11:49 AM
ok heres the problem i have a code that generated a random hex color for the folowing
red
yellow
green
black
white

this code is random so if it was a red image it could be
0,0,255
or it could be
1,1,253
i need to recognise the image so if its red i can pick up on it any ideas
note:
the defailt is hex value for the image but i have converted it to rgb and made the image load in a pic box

DJ_Klepc
02-02-2005, 02:52 PM
did you try:

Dim lngColor as Long
Dim red as Byte, green as Byte, blue as Byte
lngColor = RGB(red, green, blue)


This function converts color from rgb to long

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum