Пример #1
0
        public float[] GetChannel(ColorChannel channel)
        {
            float[] d0 = new float[Size];
            for (int i = 0; i < Size; ++i)
            {
                d0[i] = ColorSupport.ChannelGetter(channel, Space)(_colors[i]);
            }

            return(d0);
        }
Пример #2
0
        public PointSeries GetControlPoints(ColorChannel channel, ColorSpace space = ColorSpace.sRGB)
        {
            PointSeries         pp     = new PointSeries();
            Func <Color, float> getter = ColorSupport.ChannelGetter(channel, space);

            foreach (PaletteEntry entry in this)
            {
                pp.Add(new Point((double)entry.Index, getter(entry.Color)));
            }

            return(pp);
        }