• Welcome to Dark Bit Factory & Gravity.
 

Code Snippet - Seperate RGB Values from colour

Started by Shockwave, March 15, 2011

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Shockwave

I needed to do this for my destruction challenge entry amd I couldn't find a snippet to do it so I've written one.

If takes a colour and seperates it into seperate RGB values so you can do stuff to them and then recombine using the rgb satement;


            ORG=Original_Colour
            SB = (ORG AND &HFF)
            SG = ((ORG AND &HFF00) SHR 8)
            SR = ((ORG AND &HFF0000) SHR 16)
Shockwave ^ Codigos
Challenge Trophies Won: