i upload a image, i click on the image and it tells me 0 for black, and 6817807 for dark blue. how do i convert these numbers into rgb values?:confused:
Printable View
i upload a image, i click on the image and it tells me 0 for black, and 6817807 for dark blue. how do i convert these numbers into rgb values?:confused:
There are many posts/threads on VBF about this.
This is a way to do it:
Code:Dim ColorCode As Long
Dim sHex As String
Dim R As Byte, G As Byte, B As Byte
ColorCode = 6817807
R = ColorCode And &HFF&
G = (ColorCode And &HFF00&) \ &H100&
B = (ColorCode And &HFF0000) \ &H10000
Debug.Print ColorCode, R, G, B, RGB(R, G, B)
thx dude :)
well now that i have done that and i know the rgb , long value, and the colour pixel. how do i create a loop so that my program automatically reads the pixels in a row and tell me in a msgbox how many pixels are there in the row and the colours(etc white black red blue green magenta cyan) in detail?