Exemple #1
0
        private void FillComplements(Button[] Buttons, ColorEx BaseColor)
        {
            ColorEx oComplement = BaseColor.Clone( );

            oComplement.H += ( short )(ColorEx.MaxHue / 2);

            Buttons[0].Background = new SolidColorBrush(BaseColor.Color);
            Buttons[1].Background = new SolidColorBrush(oComplement.Color);
        }
Exemple #2
0
        private void FillCombinations(Array[] Buttons, ColorEx BaseColor)
        {
            ColorEx[] oQuintad = FillQuintadsInt(BaseColor);

            FillMonochromatics(( Button[] )Buttons.GetValue(0), oQuintad[0]);
            FillMonochromatics(( Button[] )Buttons.GetValue(1), oQuintad[1]);
            FillMonochromatics(( Button[] )Buttons.GetValue(2), oQuintad[2]);
            FillMonochromatics(( Button[] )Buttons.GetValue(3), oQuintad[3]);
            FillMonochromatics(( Button[] )Buttons.GetValue(4), oQuintad[4]);
        }
Exemple #3
0
        private void FillQuintads(Button[] Buttons, ColorEx BaseColor)
        {
            ColorEx[] oQuintad = FillQuintadsInt(BaseColor);

            Buttons[0].Background = new SolidColorBrush(oQuintad[0].Color);
            Buttons[1].Background = new SolidColorBrush(oQuintad[1].Color);
            Buttons[2].Background = new SolidColorBrush(oQuintad[2].Color);
            Buttons[3].Background = new SolidColorBrush(oQuintad[3].Color);
            Buttons[4].Background = new SolidColorBrush(oQuintad[4].Color);
        }
Exemple #4
0
        private void FillMonochromatics(Button[] Buttons, ColorEx BaseColor)
        {
            byte    nGap = 20;
            byte    nS   = BaseColor.S;
            ColorEx oMonochromatic0;
            ColorEx oMonochromatic1;
            ColorEx oMonochromatic2;
            ColorEx oMonochromatic3;
            ColorEx oMonochromatic4;

            while (nS <= ColorEx.MaxSaturation)
            {
                nS += nGap;
            }

            nS -= nGap;

            oMonochromatic0 = new ColorEx( )
            {
                H = BaseColor.H,
                S = nS,
                V = BaseColor.V
            };
            oMonochromatic1 = new ColorEx( )
            {
                H = BaseColor.H,
                S = ( byte )(nS - nGap),
                V = BaseColor.V
            };
            oMonochromatic2 = new ColorEx( )
            {
                H = BaseColor.H,
                S = ( byte )(nS - (2 * nGap)),
                V = BaseColor.V
            };
            oMonochromatic3 = new ColorEx( )
            {
                H = BaseColor.H,
                S = ( byte )(nS - (3 * nGap)),
                V = BaseColor.V
            };
            oMonochromatic4 = new ColorEx( )
            {
                H = BaseColor.H,
                S = ( byte )(nS - (4 * nGap)),
                V = BaseColor.V
            };

            Buttons[0].Background = new SolidColorBrush(oMonochromatic0.Color);
            Buttons[1].Background = new SolidColorBrush(oMonochromatic1.Color);
            Buttons[2].Background = new SolidColorBrush(oMonochromatic2.Color);
            Buttons[3].Background = new SolidColorBrush(oMonochromatic3.Color);
            Buttons[4].Background = new SolidColorBrush(oMonochromatic4.Color);
        }
Exemple #5
0
        private void FillAnalogous(Button[] Buttons, ColorEx BaseColor)
        {
            ColorEx oAnalogous1 = BaseColor.Clone( );
            ColorEx oAnalogous2 = BaseColor.Clone( );

            oAnalogous1.H += 30;
            oAnalogous2.H -= 30;

            Buttons[0].Background = new SolidColorBrush(BaseColor.Color);
            Buttons[1].Background = new SolidColorBrush(oAnalogous1.Color);
            Buttons[2].Background = new SolidColorBrush(oAnalogous2.Color);
        }
Exemple #6
0
        private void FillTriads(Button[] Buttons, ColorEx BaseColor)
        {
            ColorEx oTriad1 = BaseColor.Clone( );
            ColorEx oTriad2 = BaseColor.Clone( );

            oTriad1.H += 120;
            oTriad2.H -= 120;

            Buttons[0].Background = new SolidColorBrush(BaseColor.Color);
            Buttons[1].Background = new SolidColorBrush(oTriad1.Color);
            Buttons[2].Background = new SolidColorBrush(oTriad2.Color);
        }
Exemple #7
0
        private void FillSplitComplements(Button[] Buttons, ColorEx BaseColor)
        {
            ColorEx oComplement1 = BaseColor.Clone( );
            ColorEx oComplement2 = BaseColor.Clone( );

            oComplement1.H += ( short )((ColorEx.MaxHue / 2) - 30);
            oComplement2.H += ( short )((ColorEx.MaxHue / 2) + 30);

            Buttons[0].Background = new SolidColorBrush(BaseColor.Color);
            Buttons[1].Background = new SolidColorBrush(oComplement1.Color);
            Buttons[2].Background = new SolidColorBrush(oComplement2.Color);
        }
Exemple #8
0
        private void FillTetrads(Button[] Buttons, ColorEx BaseColor)
        {
            ColorEx oTetrad1 = BaseColor.Clone( );
            ColorEx oTetrad2 = BaseColor.Clone( );
            ColorEx oTetrad3 = BaseColor.Clone( );

            oTetrad1.H += 90;
            oTetrad2.H += ( short )(ColorEx.MaxHue / 2);
            oTetrad3.H += ( short )((ColorEx.MaxHue / 2) + 90);

            Buttons[0].Background = new SolidColorBrush(BaseColor.Color);
            Buttons[1].Background = new SolidColorBrush(oTetrad1.Color);
            Buttons[2].Background = new SolidColorBrush(oTetrad2.Color);
            Buttons[3].Background = new SolidColorBrush(oTetrad3.Color);
        }
Exemple #9
0
        private ColorEx[] FillQuintadsInt(ColorEx BaseColor)
        {
            ColorEx[] oQuintad = new ColorEx[5];

            oQuintad[0] = BaseColor.Clone( );
            oQuintad[1] = BaseColor.Clone( );
            oQuintad[2] = BaseColor.Clone( );
            oQuintad[3] = BaseColor.Clone( );
            oQuintad[4] = BaseColor.Clone( );

            oQuintad[1].H += 72;
            oQuintad[2].H += 2 * 72;
            oQuintad[3].H += 3 * 72;
            oQuintad[4].H += 4 * 72;

            return(oQuintad);
        }