Posted By

activetofocus on 08/21/10


Tagged

rgbcolorchannelsepratecombineas3flash


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

adrianparr
shalomfriss


RGB color channel/seprate and combine


 / Published in: ActionScript 3
 

URL: http://blog.activetofocus.com/2009/10/18/rgb-color-channelseprate-and-combine/

Here are a simple method for seprate and combine RGB color.

  1. To seprate the color channels:
  2.  
  3. * R = 0xFC3343 >> 16
  4.  
  5. * G = (0xFC3343 >> 8 ) & 0xFF
  6.  
  7. * B = 0xFC3343 & 0xFF
  8.  
  9. To combine them:
  10.  
  11. * RGB = (0xFC << 16) + (33 << 8 ) + 0×43

Report this snippet  

You need to login to post a comment.