In Visual Basic, colours are generally represented by an Integer, a hexadecimal number in 4 bytes. When specifying an explicit RGB color, the value has the following hexadecimal form:
The low-order byte contains a value for the relative intensity of red; the second byte contains a value for green; and the third byte contains a value for blue. The maximum value for a single byte is 0xFF.
To create a color value in Vistual Basic, you can use the RGB function. The RGB function returns an Integer value representing an RGB color value from a set of red, green and blue color components:
RGB( _ Red As Integer, _ Green As Integer, _ Blue As Integer _ )
Dim myColor As Integer myColor = RGB(255, 0, 0 ) ' return the value for red, same as 0x000000FF myColor = 0x000000FF ' return the value for red.
ACA Color Picker supports for capturing the color value of any screen pixel and displays its value in VB Color Code. To apply this feature, please do following steps: