示例#1
0
文件: CIELab.cs 项目: guipaz/venomsw
        public static CIELab FromCIExyz(CIExyz xyzColor)
        {
            var transformedX = Transformxyz(xyzColor.x / CIExyz.RefX);
            var transformedY = Transformxyz(xyzColor.y / CIExyz.RefY);
            var transformedZ = Transformxyz(xyzColor.z / CIExyz.RefZ);

            var L = 116.0 * transformedY - 16;
            var a = 500.0 * (transformedX - transformedY);
            var b = 200.0 * (transformedY - transformedZ);

            return(new CIELab(L, a, b));
        }
示例#2
0
文件: CIELab.cs 项目: guipaz/venomsw
 public static CIELab FromRGB(Color color)
 {
     return(FromCIExyz(CIExyz.FromRGB(color)));
 }