Illumilib/IllumilibLighting.cs
/// <summary>
/// Sets the lighting in the given area on the keyboard to the given color.
/// The position is zero-based, with 0, 0 being the key in the top left corner of the keyboard.
/// The position is the top left corner of the rectangle that represents the area to set colors in.
/// </summary>
/// <param name="x">The zero-based x position of the key</param>
/// <param name="y">The zero-based y position of the key</param>
/// <param name="width">The width of the area to set the color in</param>
/// <param name="height">The height of the area to set the color in</param>
/// <param name="r">The color's red value, between 0 and 1</param>
/// <param name="g">The color's green value, between 0 and 1</param>
/// <param name="b">The color's blue value, between 0 and 1</param>
/// <exception cref="ArgumentOutOfRangeException">Thrown if the positions are out of range in relation to <see cref="KeyboardWidth"/> and <see cref="KeyboardHeight"/></exception>
Sets the lighting in the given area on the keyboard to the given color.
The position is zero-based, with 0, 0 being the key in the top left corner of the keyboard.
The position is the top left corner of the rectangle that represents the area to set colors in.
Sets the lighting in the given area on the keyboard to the given color . The position is zero - based with 0 0 being the key in the top left corner of the keyboard . The position is the top left corner of the rectangle that represents the area to set colors in .
public static void SetKeyboardLighting(int x, int y, int width, int height, float r, float g, float b) {
            if (x < 0 || x + width > KeyboardWidth)
                throw new ArgumentOutOfRangeException(nameof(x));
            if (y < 0 || y + height > KeyboardHeight)
                throw new ArgumentOutOfRangeException(nameof(y));
            ForEach(s => s.SetKeyboardLighting(x, y, width, height, r, g, b));
        }
public static void SetKeyboardLighting ( int x , int y , int width , int height , float r , float g , float b ) { if ( x < 0 || x + width > KeyboardWidth ) throw new ArgumentOutOfRangeException ( nameof ( x ) ) ; if ( y < 0 || y + height > KeyboardHeight ) throw new ArgumentOutOfRangeException ( nameof ( y ) ) ; ForEach ( s => s . SetKeyboardLighting ( x , y , width , height , r , g , b ) ) ; }
Sets the lighting in the given area on the keyboard to the given color.
Sets the lighting in the given area on the keyboard to the given color .
Thrown if the positions are out of range in relation to  and
Thrown if the positions are out of range in relation to and
x
int
The zero-based x position of the key
The zero - based x position of the key
y
int
The zero-based y position of the key
The zero - based y position of the key
width
int
The width of the area to set the color in
The width of the area to set the color in
height
int
The height of the area to set the color in
The height of the area to set the color in
r
float
The color's red value, between 0 and 1
The color ' s red value between 0 and 1
g
float
The color's green value, between 0 and 1
The color ' s green value between 0 and 1
b
float
The color's blue value, between 0 and 1
The color ' s blue value between 0 and 1