public void updateColorFromHSV() // update values and button color
        {
            ColorTools.HSV2RGB(hue, saturation, value, out R, out G, out B);
            redTB.Text   = R.ToString();
            greenTB.Text = G.ToString();
            blueTB.Text  = B.ToString();
            hueTB.Text   = hue.ToString();
            satTB.Text   = saturation.ToString();
            valueTB.Text = value.ToString();

            redTrackBar.Value   = (int)(R * redTrackBar.Maximum);
            greenTrackBar.Value = (int)(G * greenTrackBar.Maximum);
            blueTrackBar.Value  = (int)(B * blueTrackBar.Maximum);
            hueTrackBar.Value   = (int)(hue);

            colorButton.BackColor = Color.FromArgb(255, ColorTools.Float2RGBClamp(R), ColorTools.Float2RGBClamp(G), ColorTools.Float2RGBClamp(B));
        }