Need a bit clarification on sf::Color,
I used getPixel from image to save pixel color:
sf::Color color = image.getPixel(280, 275);
now as I understand Color has properties r g b a to get Uint8 as corresponding values..
Then, when i wanted to see what those numbers area i tried cout:
cout << color.r << endl;
cout << color.g << endl;
cout << color.b << endl;
At this point im expecting to see numbers that correspond to R,G,B,A values of that color, however console window shows some weird symbols instead of numbers
then I tried to cast them as ints
cout << (int)color.r << endl;
cout << (int)color.g << endl;
cout << (int)color.b << endl;
now I saw numbers, are those numbers now actual rgb values of given pixel?
Then I also noticed sf::Color has toInteger() method.
So I tried:
cout << color.toInteger() << endl;
which does give me a sequence of numbers, HOWEVER, this sequence is vastly different from from individual values I see from (int) cast of r g b values.
pardon if it's something really simple & obvious but help me understand how can I get r g b a numeric values from sf::Color variable.