Lines Matching defs:luminance
21 * Luma is used to specify a linear luminance value [0.0, 1.0].
22 * Luminance is used to specify a luminance value in an arbitrary color space [0.0, 1.0].
28 /** Converts a color component luminance in the color space to a linear luma. */
29 virtual SkScalar toLuma(SkScalar gamma, SkScalar luminance) const = 0;
30 /** Converts a linear luma to a color component luminance in the color space. */
33 /** Converts a color to a luminance value. */
35 const SkColorSpaceLuminance& luminance = Fetch(gamma);
36 SkScalar r = luminance.toLuma(gamma, SkIntToScalar(SkColorGetR(c)) / 255);
37 SkScalar g = luminance.toLuma(gamma, SkIntToScalar(SkColorGetG(c)) / 255);
38 SkScalar b = luminance.toLuma(gamma, SkIntToScalar(SkColorGetB(c)) / 255);
43 return SkScalarRoundToInt(luminance.fromLuma(gamma, luma) * 255);
91 * @param R The number of luminance bits to use [1, 8] from the red channel.
92 * @param G The number of luminance bits to use [1, 8] from the green channel.
93 * @param B The number of luminance bits to use [1, 8] from the blue channel.