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. Extracting RGB values from a color

Extracting RGB values from a color

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
4 Posts 3 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.
  • I Offline
    I Offline
    IGeorgeI
    wrote on last edited by
    #1

    I am receiving an RGB color in a method. 1) I want to strip the color into it's fundamental components. 2) I want to store these values as integers within the method. Ex. the method gets the color RGB (55, 155, 255) I want to extract the numbers into variables. int red = 55; int green = 155; int blue = 255; ====================================================== Any suggestions on how to strip the color into it's seperate RGB values???? I've done this before but I can't remember. George W Software Developer www.zsystems.ca

    K M 2 Replies Last reply
    0
    • I IGeorgeI

      I am receiving an RGB color in a method. 1) I want to strip the color into it's fundamental components. 2) I want to store these values as integers within the method. Ex. the method gets the color RGB (55, 155, 255) I want to extract the numbers into variables. int red = 55; int green = 155; int blue = 255; ====================================================== Any suggestions on how to strip the color into it's seperate RGB values???? I've done this before but I can't remember. George W Software Developer www.zsystems.ca

      K Offline
      K Offline
      Keith D
      wrote on last edited by
      #2

      what's the format of the RGB variable? 3 bytes long or what?

      1 Reply Last reply
      0
      • I IGeorgeI

        I am receiving an RGB color in a method. 1) I want to strip the color into it's fundamental components. 2) I want to store these values as integers within the method. Ex. the method gets the color RGB (55, 155, 255) I want to extract the numbers into variables. int red = 55; int green = 155; int blue = 255; ====================================================== Any suggestions on how to strip the color into it's seperate RGB values???? I've done this before but I can't remember. George W Software Developer www.zsystems.ca

        M Offline
        M Offline
        Magnus Westin
        wrote on last edited by
        #3

        GetBValue, GetGValue and GetRValue Magnus

        I 1 Reply Last reply
        0
        • M Magnus Westin

          GetBValue, GetGValue and GetRValue Magnus

          I Offline
          I Offline
          IGeorgeI
          wrote on last edited by
          #4

          That's it!!!! Thanks for your help. George W Software Developer www.zsystems.ca

          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