calculating in linear color space