Lines Matching refs:luminance
538 SkScalar luminance = 0.5f*(max + min)/255.f;
541 // We compute a color alpha value based on the luminance of the color, scaled by an
546 // f(luminance, 0) = 0
552 SkScalar colorAlpha = (3.544762f + (-4.891428f + 2.3466f*luminance)*luminance)*luminance;
555 // Similarly, we set the greyscale alpha based on luminance and alpha so that
557 // f(luminance, 0) = 0
559 SkScalar greyscaleAlpha = SkTPin(origA*(1 - 0.4f*luminance), 0.0f, 1.0f);
562 // alpha computed from the color's luminance (C_a), and then a black shadow with alpha (S_a)