Color Picker: Returns Exact Value of Color From Image in PictureBox

Category:
Screen/Graphics
Type:
Applications
Difficulty:
Intermediate
Author:
Ramon Antonio Gimenez

Version Compatibility: Visual Basic 6, Visual Basic 5

More information:
This programs lets you click a point on any image and get its color value (using the RGB functions) and from this, the individual components of each basic color, in Dec and Hex formats.

May be the approach i used is not the correct one, but i realized that the hex value converted from the long returned by the RGB function, could be treated as the concatenation of three strings of two characters each. The first, representing the Blue color, the second the Green and the third the Red color. So using a couple of very well known string functions i could extract this values.


Instructions: Click the link below to download the code. Select 'Save' from the IE popup dialog. Once downloaded, open the .zip file from your local drive using WinZip or a comparable program to view the contents.

Download colorpicker.zip