Color conversion math and formulas