Detect colours

I'm working on a game that uses different colours and I was wondering what is a api or library that could allow me to detect the colours on certain text.
And if it matters Iv'e been using this to change the texts colour
Last edited on
If you yourself are setting the text color... why do you need the API to tell you what color it is? Shouldn't you already know since you're the one who set it?
Because Im changing it so i can have the player move the problem is it changes the background colour behind if its not the same one.
Yes... but you already know what kind of background the player is on, right? So with that information you should know what color it should be.
The background is not all the same so I cant tell want background hes on and theres no pattern to it.
Don't worry I did a different method for solving it I was mostly just curious if there was an api for it.
Google "msdn ReadConsoleOutputAttribute" for how to get the color (attribute) of one or more cells in the console display.

Your different method for solving is more likely to be the correct way, however.
Topic archived. No new replies allowed.