Not yet rated

Problem

You need to separate the color channels and/or combine them.

Solution

See below for a a detailed explanation on both separating and combining color channels.

Detailed explanation

To separate the color channels

  • R = 0xFC3343  >>  16
  • G = (0xFC3343 >> 8 )  &  0xFF
  • B = 0xFC3343  &  0xFF

 

To combine them:

  • R G B =  (0xFC <<  16) + (0×33  <<  8 )  + 0×43

 

This recipe was originally posted at: http://activetofocus.com/blog/rgb-color-channel-seprate-and-combine-8/


+
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. Permissions beyond the scope of this license, pertaining to the examples of code included within this work are available at Adobe.

Report abuse

Related recipes