ConvertToHSL() public method

Konvertiere RGB nach HSL Farbsystem
public ConvertToHSL ( int r, int g, int b, double &hue, double &saturation, double &luminance ) : void
r int Rotwert 0-255
g int Grünwert 0-255
b int Blauwert 0-255
hue double Variable als OUT, auf welche der HUE-Wert gespeichert wird
saturation double Variable als OUT, auf welche der Sättigungs-Wert gespeichert wird
luminance double Variable als OUT, auf welche der Helligkeits-Wert gespeichert wird
return void
Ejemplo n.º 1
0
Archivo: HueLamp.cs Proyecto: in18/hics
        /// <summary>
        /// Farbwert einer Lampe mittels RGB-System setzen
        /// </summary>
        /// <param name="r">Rot-Wert</param>
        /// <param name="g">Grün-Wert</param>
        /// <param name="b">Blau-Wert</param>
        public void SetColor(int r, int g, int b)
        {
            HSVRGB hsvrgb = new HSVRGB();
            double hue, sat, bri;

            hsvrgb.ConvertToHSL(r, g, b, out hue, out sat, out bri);

            this.hue = hue;
            this.saturation = sat;
            this.brightness = bri;
        }