Exemple #1
0
        public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var color      = (CommonColor)value;
            var colorStart = CommonColor.FromCMYK(color.C, 0, color.Y, color.K, color.A).ToColor();
            var colorEnd   = CommonColor.FromCMYK(color.C, 1, color.Y, color.K, color.A).ToColor();

            return(ConvertImplementation(colorStart, colorEnd));
        }
 public static CommonColor UpdateCMYK(
     this CommonColor color,
     double?c   = null,
     double?m   = null,
     double?y   = null,
     double?k   = null,
     byte?alpha = null)
 {
     return(CommonColor.FromCMYK(
                c: c ?? color.C,
                m: m ?? color.M,
                y: y ?? color.Y,
                k: k ?? color.K,
                alpha: alpha ?? color.A));
 }
 public CommonColor ColorFromCMYKTest(CMYK cmyk) => CommonColor.FromCMYK(cmyk.C, cmyk.M, cmyk.Y, cmyk.K);