What I'm trying to do is to test if a pixel is blue or not.
For example: The blue color is in RGB defined as rgb(0,0,255). Typical color depths are 8 bit (256 colours), 16 bit (about 65 thousand), 24 bit (about 16 million) and 32 bit (over 4 billion different colours). So there is clearly more than 1 shade of blue.
How do I define the range of the blue color and test for each pixel if it's blue or not? And what do i need to bear in mind regarding the different depths?
My code so far is:
BufferedImage image = ImageIO.read(file);
// Getting pixel color by position x and y
for (int i = 0; i < image.getWidth(); i++) {
for (int j = 0; j < image.getHeight(); j++) {
int clr = image.getRGB(i, j);
Note 1:
http://www.workwithcolor.com/cyan-blue-color-hue-range-01.htm
The problem here is, what is in between the color steps?
An example would be great.
Note 2:
I just found a presentation about the topic i'm interested in:
On page 13 we can see the definition of red. But how can you define the other colors?