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. Extract RGB Colors

Extract RGB Colors

Scheduled Pinned Locked Moved C / C++ / MFC
question
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.
  • D Offline
    D Offline
    Django_Untaken
    wrote on last edited by
    #1

    Hello. How do I extract RGB colors from a byte ? Thanks

    L CPalliniC E 3 Replies Last reply
    0
    • D Django_Untaken

      Hello. How do I extract RGB colors from a byte ? Thanks

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      See http://msdn.microsoft.com/en-us/library/windows/desktop/ms536244(v=vs.85).aspx[^].

      Veni, vidi, abiit domum

      1 Reply Last reply
      0
      • D Django_Untaken

        Hello. How do I extract RGB colors from a byte ? Thanks

        CPalliniC Offline
        CPalliniC Offline
        CPallini
        wrote on last edited by
        #3

        If you have 1 byte representing a color then it is probably just the index of the full RGB color inside the corresponding palette.

        Veni, vidi, vici.

        In testa che avete, signor di Ceprano?

        1 Reply Last reply
        0
        • D Django_Untaken

          Hello. How do I extract RGB colors from a byte ? Thanks

          E Offline
          E Offline
          Eugen Podsypalnikov
          wrote on last edited by
          #4

          Just mask the bits[^] out :) (do you still need some help ?)

          They sought it with thimbles, they sought it with care; They pursued it with forks and hope; They threatened its life with a railway-share; They charmed it with smiles and soap. :)

          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