mickey max
12-12-2004, 09:21 PM
does anyone know how i could change the integer you recieve from using the point function into seperate integers representing red blue and green?
thnx
thnx
rgb colormickey max 12-12-2004, 09:21 PM does anyone know how i could change the integer you recieve from using the point function into seperate integers representing red blue and green? thnx JPB 12-12-2004, 09:33 PM I assume that the number returned is a decimal representation of a colour from 1 to 16.7 million. If so: strText = Hex(lngColor) Should get you a Hex representation of the colour, i.e. white = FFFFFF Then, you can use left, mid, right to extract the 3 values. into a temp string, and use CLng("&h" & strTemp) to get the decimal value of the R, G or B value. What I am not sure of is if the returned hex number will be in RGB order or not (it may be RBG or GBR or any variation thereof), so you will have to do some experimentation. OnErr0r 12-12-2004, 09:43 PM red = color And &HFF green = (color And &HFF00&) \ 256 blue = color \ 65536 |
EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum