aboutsummaryrefslogtreecommitdiff
path: root/docs/feature_rgblight.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/feature_rgblight.md')
-rw-r--r--docs/feature_rgblight.md64
1 files changed, 47 insertions, 17 deletions
diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md
index d48941a04..52d5c5fe8 100644
--- a/docs/feature_rgblight.md
+++ b/docs/feature_rgblight.md
@@ -63,8 +63,6 @@ Changing the **Value** sets the overall brightness.
63|`RGB_MODE_GRADIENT`|`RGB_M_G` |Static gradient animation mode | 63|`RGB_MODE_GRADIENT`|`RGB_M_G` |Static gradient animation mode |
64|`RGB_MODE_RGBTEST` |`RGB_M_T` |Red, Green, Blue test animation mode | 64|`RGB_MODE_RGBTEST` |`RGB_M_T` |Red, Green, Blue test animation mode |
65 65
66?> For backwards compatibility, `RGB_SMOD` is another alias of `RGB_MOD`.
67
68## Configuration 66## Configuration
69 67
70Your RGB lighting can be configured by placing these `#define`s in your `config.h`: 68Your RGB lighting can be configured by placing these `#define`s in your `config.h`:
@@ -79,28 +77,41 @@ Your RGB lighting can be configured by placing these `#define`s in your `config.
79 77
80## Animations 78## Animations
81 79
82Not only can this lighting be whatever color you want, if `RGBLIGHT_ANIMATIONS` is defined, you also have a number of animation modes at your disposal: 80
83 81Not only can this lighting be whatever color you want,
84|Mode |Description | 82if `RGBLIGHT_EFFECT_xxxx` or `RGBLIGHT_ANIMATIONS` is defined, you also have a number of animation modes at your disposal:
85|-----|---------------------| 83
86|1 |Solid color | 84|Mode number symbol |Additional number |Description |
87|2-5 |Solid color breathing| 85|-----------------------------|-------------------|---------------------------------------|
88|6-8 |Cycling rainbow | 86|`RGBLIGHT_MODE_STATIC_LIGHT` | *None* |Solid color (this mode is always enabled) |
89|9-14 |Swirling rainbow | 87|`RGBLIGHT_MODE_BREATHING` | 0,1,2,3 |Solid color breathing |
90|15-20|Snake | 88|`RGBLIGHT_MODE_RAINBOW_MOOD` | 0,1,2 |Cycling rainbow |
91|21-23|Knight | 89|`RGBLIGHT_MODE_RAINBOW_SWIRL`| 0,1,2,3,4,5 |Swirling rainbow |
92|24 |Christmas | 90|`RGBLIGHT_MODE_SNAKE` | 0,1,2,3,4,5 |Snake |
93|25-34|Static gradient | 91|`RGBLIGHT_MODE_KNIGHT` | 0,1,2 |Knight |
94|35 |RGB Test | 92|`RGBLIGHT_MODE_CHRISTMAS` | *None* |Christmas |
95|36 |Alternating | 93|`RGBLIGHT_MODE_STATIC_GRADIENT`| 0,1,..,9 |Static gradient |
94|`RGBLIGHT_MODE_RGB_TEST` | *None* |RGB Test |
95|`RGBLIGHT_MODE_ALTERNATING` | *None* |Alternating |
96 96
97Check out [this video](https://youtube.com/watch?v=VKrpPAHlisY) for a demonstration. 97Check out [this video](https://youtube.com/watch?v=VKrpPAHlisY) for a demonstration.
98 98
99Note: For versions older than 0.6.117, The mode numbers were written directly. In `quantum/rgblight.h` there is a contrast table between the old mode number and the current symbol.
100
99The following options can be used to tweak the various animations: 101The following options can be used to tweak the various animations:
100 102
101|Define |Default |Description | 103|Define |Default |Description |
102|------------------------------------|-------------|-------------------------------------------------------------------------------------| 104|------------------------------------|-------------|-------------------------------------------------------------------------------------|
103|`RGBLIGHT_ANIMATIONS` |*Not defined*|If defined, enables additional animation modes | 105|`RGBLIGHT_EFFECT_BREATHING` |*Not defined*|If defined, enable breathing animation mode. |
106|`RGBLIGHT_EFFECT_RAINBOW_MOOD` |*Not defined*|If defined, enable rainbow mood animation mode. |
107|`RGBLIGHT_EFFECT_RAINBOW_SWIRL` |*Not defined*|If defined, enable rainbow swirl animation mode. |
108|`RGBLIGHT_EFFECT_SNAKE` |*Not defined*|If defined, enable snake animation mode. |
109|`RGBLIGHT_EFFECT_KNIGHT` |*Not defined*|If defined, enable knight animation mode. |
110|`RGBLIGHT_EFFECT_CHRISTMAS` |*Not defined*|If defined, enable christmas animation mode. |
111|`RGBLIGHT_EFFECT_STATIC_GRADIENT` |*Not defined*|If defined, enable static gradient mode. |
112|`RGBLIGHT_EFFECT_RGB_TEST` |*Not defined*|If defined, enable RGB test animation mode. |
113|`RGBLIGHT_EFFECT_ALTERNATING` |*Not defined*|If defined, enable alternating animation mode. |
114|`RGBLIGHT_ANIMATIONS` |*Not defined*|If defined, enables all additional animation modes |
104|`RGBLIGHT_EFFECT_BREATHE_CENTER` |`1.85` |Used to calculate the curve for the breathing animation. Valid values are 1.0 to 2.7 | 115|`RGBLIGHT_EFFECT_BREATHE_CENTER` |`1.85` |Used to calculate the curve for the breathing animation. Valid values are 1.0 to 2.7 |
105|`RGBLIGHT_EFFECT_BREATHE_MAX` |`255` |The maximum brightness for the breathing mode. Valid values are 1 to 255 | 116|`RGBLIGHT_EFFECT_BREATHE_MAX` |`255` |The maximum brightness for the breathing mode. Valid values are 1 to 255 |
106|`RGBLIGHT_EFFECT_SNAKE_LENGTH` |`4` |The number of LEDs to light up for the "Snake" animation | 117|`RGBLIGHT_EFFECT_SNAKE_LENGTH` |`4` |The number of LEDs to light up for the "Snake" animation |
@@ -109,6 +120,7 @@ The following options can be used to tweak the various animations:
109|`RGBLIGHT_EFFECT_KNIGHT_LED_NUM` |`RGBLED_NUM` |The number of LEDs to have the "Knight" animation travel | 120|`RGBLIGHT_EFFECT_KNIGHT_LED_NUM` |`RGBLED_NUM` |The number of LEDs to have the "Knight" animation travel |
110|`RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL`|`1000` |How long to wait between light changes for the "Christmas" animation, in milliseconds| 121|`RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL`|`1000` |How long to wait between light changes for the "Christmas" animation, in milliseconds|
111|`RGBLIGHT_EFFECT_CHRISTMAS_STEP` |`2` |The number of LEDs to group the red/green colors by for the "Christmas" animation | 122|`RGBLIGHT_EFFECT_CHRISTMAS_STEP` |`2` |The number of LEDs to group the red/green colors by for the "Christmas" animation |
123|`RGBLIGHT_RAINBOW_SWIRL_RANGE` |`360` |Range adjustment for the rainbow swirl effect to get different swirls |
112 124
113You can also modify the speeds that the different modes animate at: 125You can also modify the speeds that the different modes animate at:
114 126
@@ -149,6 +161,24 @@ If you need to change your RGB lighting in code, for example in a macro to chang
149|`rgblight_sethsv(h, s, v)` |Set all LEDs to the given HSV value where `h` is between 0 and 360 and `s`/`v` are between 0 and 255 | 161|`rgblight_sethsv(h, s, v)` |Set all LEDs to the given HSV value where `h` is between 0 and 360 and `s`/`v` are between 0 and 255 |
150|`rgblight_sethsv_noeeprom(h, s, v)`|Set all LEDs to the given HSV value where `h` is between 0 and 360 and `s`/`v` are between 0 and 255 (not written to EEPROM) | 162|`rgblight_sethsv_noeeprom(h, s, v)`|Set all LEDs to the given HSV value where `h` is between 0 and 360 and `s`/`v` are between 0 and 255 (not written to EEPROM) |
151|`rgblight_sethsv_at(h, s, v, led)` |Set a single LED to the given HSV value, where `h` is between 0 and 360, `s`/`v` are between 0 and 255, and `led` is between 0 and `RGBLED_NUM` (not written to EEPROM)| 163|`rgblight_sethsv_at(h, s, v, led)` |Set a single LED to the given HSV value, where `h` is between 0 and 360, `s`/`v` are between 0 and 255, and `led` is between 0 and `RGBLED_NUM` (not written to EEPROM)|
164|`rgblight_toggle()` |Toggle all LEDs between on and off |
165|`rgblight_toggle_noeeprom()` |Toggle all LEDs between on and off (not written to EEPROM) |
166|`rgblight_step()` |Change the mode to the next RGB animation in the list of enabled RGB animations |
167|`rgblight_step_noeeprom()` |Change the mode to the next RGB animation in the list of enabled RGB animations (not written to EEPROM) |
168|`rgblight_step_reverse()` |Change the mode to the previous RGB animation in the list of enabled RGB animations |
169|`rgblight_step_reverse_noeeprom()` |Change the mode to the previous RGB animation in the list of enabled RGB animations (not written to EEPROM) |
170|`rgblight_increase_hue()` |Increase the hue for all LEDs. This wraps around at maximum hue |
171|`rgblight_increase_hue_noeeprom()` |Increase the hue for all LEDs. This wraps around at maximum hue (not written to EEPROM) |
172|`rgblight_decrease_hue()` |Decrease the hue for all LEDs. This wraps around at minimum hue |
173|`rgblight_decrease_hue_noeeprom()` |Decrease the hue for all LEDs. This wraps around at minimum hue (not written to EEPROM) |
174|`rgblight_increase_sat()` |Increase the saturation for all LEDs. This wraps around at maximum saturation |
175|`rgblight_increase_sat_noeeprom()` |Increase the saturation for all LEDs. This wraps around at maximum saturation (not written to EEPROM) |
176|`rgblight_decrease_sat()` |Decrease the saturation for all LEDs. This wraps around at minimum saturation |
177|`rgblight_decrease_sat_noeeprom()` |Decrease the saturation for all LEDs. This wraps around at minimum saturation (not written to EEPROM) |
178|`rgblight_increase_val()` |Increase the value for all LEDs. This wraps around at maximum value |
179|`rgblight_increase_val_noeeprom()` |Increase the value for all LEDs. This wraps around at maximum value (not written to EEPROM) |
180|`rgblight_decrease_val()` |Decrease the value for all LEDs. This wraps around at minimum value |
181|`rgblight_decrease_val_noeeprom()` |Decrease the value for all LEDs. This wraps around at minimum value (not written to EEPROM) |
152 182
153Additionally, [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h) defines several predefined shortcuts for various colors. Feel free to add to this list! 183Additionally, [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h) defines several predefined shortcuts for various colors. Feel free to add to this list!
154 184