Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. RGB(255,0,0) to CString name

RGB(255,0,0) to CString name

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    eyalle
    wrote on last edited by
    #1

    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'

    C N 2 Replies Last reply
    0
    • E eyalle

      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'

      C Offline
      C Offline
      CPallini
      wrote on last edited by
      #2

      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]

      1 Reply Last reply
      0
      • E eyalle

        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'

        N Offline
        N Offline
        Nishad S
        wrote on last edited by
        #3

        A list of colors is available here[^]

        - ns ami -

        T 1 Reply Last reply
        0
        • N Nishad S

          A list of colors is available here[^]

          - ns ami -

          T Offline
          T Offline
          ThatsAlok
          wrote on last edited by
          #4

          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" - Mixture

          cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups