예제 #1
0
            public override ColorBgra Apply(ColorBgra color)
            {
                float colorAverage = color.GetAverageColorChannelValueF();
                float scale        = (colorAverage - BackAverage) / (ForeAverage - BackAverage);
                byte  alpha        = Utility.ClampToByte(scale * 255);

                return(color.NewAlpha(alpha));
            }