An change you would be willing to update this code to work with full floating point colors? That way they could also have an intensity (a scalar of the RGB values).
So a color of (r=0.3, g=0.7, b=0.1) and intensity (10) would be a value of (r=3, g=7, b=1). Alpha values will remain a value of 0-1.