public void GetColorInfo(Color color)
        {
            ChangeNeeded = false;

            TargetRGB    = color;
            TargetHSV.H  = color.GetHue();
            TargetHSV.S  = color.GetSaturation();
            TargetHSV.V  = color.GetBrightness();
            TargetXYZ    = CIELab.RGB_to_XYZ(color);
            TargetCIELab = CIELab.XYZ_to_CIELab(TargetXYZ);

            SetRGB();
            SetHSV();
            SetXYZ();
            SetCIELab();

            ChangeNeeded = true;
        }
        public void ConvertColor()
        {
            ChangeNeeded = false;
            switch (ConvertType)
            {
            case "RGB":
                TargetRGB = Color.FromArgb(Int32.Parse(RGB_R.Text), Int32.Parse(RGB_G.Text), Int32.Parse(RGB_B.Text));

                TargetXYZ    = CIELab.RGB_to_XYZ(TargetRGB);
                TargetCIELab = CIELab.RGB_to_CIELab(TargetRGB);
                TargetHSV    = HSV.RGB_to_HSV(TargetRGB);

                SetHSV();
                SetXYZ();
                SetCIELab();
                break;

            case "HSV":
                TargetHSV.H = Double.Parse(HSV_H.Text);
                TargetHSV.S = Double.Parse(HSV_S.Text);
                TargetHSV.V = Double.Parse(HSV_V.Text);

                TargetRGB    = HSV.HSV_to_RGB(TargetHSV);
                TargetXYZ    = CIELab.RGB_to_XYZ(TargetRGB);
                TargetCIELab = CIELab.RGB_to_CIELab(TargetRGB);

                SetRGB();
                SetXYZ();
                SetCIELab();
                break;

            case "XYZ":
                TargetXYZ[0] = Double.Parse(XYZ_X.Text) * 100d;
                TargetXYZ[1] = Double.Parse(XYZ_Y.Text) * 100d;
                TargetXYZ[2] = Double.Parse(XYZ_Z.Text) * 100d;

                TargetRGB    = CIELab.XYZ_to_RGB(TargetXYZ);
                TargetCIELab = CIELab.XYZ_to_CIELab(TargetXYZ);
                TargetHSV    = HSV.RGB_to_HSV(TargetRGB);

                SetRGB();
                SetHSV();
                SetCIELab();
                break;

            case "Lab":
                TargetCIELab.L = Double.Parse(Lab_L.Text);
                TargetCIELab.a = Double.Parse(Lab_a.Text);
                TargetCIELab.b = Double.Parse(Lab_b.Text);

                TargetRGB = CIELab.CIELab_to_RGB(TargetCIELab);
                TargetXYZ = CIELab.CIELab_to_XYZ(TargetCIELab);
                TargetHSV = HSV.RGB_to_HSV(TargetRGB);

                SetRGB();
                SetHSV();
                SetXYZ();
                break;
            }
            targetColor.BackColor = TargetRGB;
            ConvertType           = "";
            ChangeNeeded          = true;
        }