color conversions and the supporting math functions