RGB(255,0,0) to CString name
-
hi, i have a COLORREF itme. i know how to convert it to RGB but my Question is, if i can show the name of the color Ex. RGB(255,0,0) --> Red RGB(65-105-225 ) --> Royal Blue Thanks'
You may use a
std::map
[^] for the purpose. Of course you've to fill the map with proper values. :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
hi, i have a COLORREF itme. i know how to convert it to RGB but my Question is, if i can show the name of the color Ex. RGB(255,0,0) --> Red RGB(65-105-225 ) --> Royal Blue Thanks'
-
Nishad S wrote:
A list of colors is available here[^]
Great!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
Never mind - my own stupidity is the source of every "problem" - Mixturecheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You