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)