I'm designing a program with java that compares pixels and their RGB values within a picture. For example I have one column of pixels and I want to assign a value to each pixel in which it ranks each pixel according to a scale.
Example Scale:
Dark green = 500 > Light Green =400 > Yellow =300 > Light Red=200 > Dark Red=100
I want to be able to attain/print these values and everything in between as in getting something like 430 when a pixel is a color between light green and dark green. I struggling to find a method that will allow me to compare these colors.