RGB color channel/seprate and combine


/ Published in: ActionScript 3
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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) + (0×33 << 8 ) + 0×43

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.