Exemplo n.º 1
0
        Color GetSceneColor(SceneViewModel scene)
        {
            var c = new LColor()
            {
                HSB_H = scene.Rhythm / 100 * 360, HSB_S = 1, HSB_B = 1
            };

            return(c.getColor());
        }
Exemplo n.º 2
0
        //LabMode currentLabMode = LabMode.CIE;
        private void buttonChangeLab_Click(object sender, RoutedEventArgs e)
        {
            Color  cc = Color.FromArgb(255, Convert.ToByte(textBlockCurrentGRB_R.Text), Convert.ToByte(textBlockCurrentGRB_G.Text), Convert.ToByte(textBlockCurrentGRB_B.Text));
            LColor lc = new LColor();

            lc.setColorByLab(lynxUpDownLab_L.DoubleValue, lynxUpDownLab_a.DoubleValue, lynxUpDownLab_b.DoubleValue, pt.CurrentLabMode);

            Color sc = lc.getColor();

            rectangleS.Fill = new SolidColorBrush(sc);
            ShowSourceInfor(sc);
            ShowTrueColorDiffrent(cc, sc);
            if (currentImage != null)
            {
                currentImage.Tag = sc;//变更其理论颜色
            }
        }