added color calculation from rgb to XYZ