i have a question, is there some library, or piece of code that can detect if color is most similar to greeen, blue, yellow or so?
i can decompose the pixel color of TImage with this function:
procedure RGB(Col: TColor; var R, G, B: Byte);
var
Color: $0..$FFFFFFFF;
begin
Color := ColorToRGB(Col);
R := ($000000FF and Color);
G := ($0000FF00 and Color) Shr 8;
B := ($00FF0000 and Color) Shr 16;
end;
but with simply comparation of r>g>b i cannot determine, if the color is more similar to yellow, brown or so. I need only few basic colors (working on little kids education stuff)
I will be very thankfull for every hint, or help.