just some snippets re: color values.

number to hex string:

hex string to number:

RGBA to RGB:

individual colors from number:

number from individual colors: