summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorErovia <Erovia@users.noreply.github.com>2019-04-22 17:26:41 +0200
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>2019-04-22 17:26:41 +0200
commit066818f5f9cbee4ade1ea94ee167ee2df7d9e559 (patch)
treee9276a47f8f421211e54c5a1685d69ac2f6a908e /docs
parentc7583d181a2cae24af60efa93caa3d662e5d48f4 (diff)
downloadqmk_firmware-066818f5f9cbee4ade1ea94ee167ee2df7d9e559.tar.gz
qmk_firmware-066818f5f9cbee4ade1ea94ee167ee2df7d9e559.tar.xz
Define RGB colors (#5300)
* Define RGB colors Define RGB colors and pass them to the rgblight functions, instead of defining multiple macros. * Add new color definitions support for RGB Matrix * Add/clarify info about new color definitions in Docs * Add deprecation warning banner to rgblight_list.h
Diffstat (limited to 'docs')
-rw-r--r--docs/feature_rgb_matrix.md29
-rw-r--r--docs/feature_rgblight.md35
2 files changed, 63 insertions, 1 deletions
diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md
index acef4717d..5309e749c 100644
--- a/docs/feature_rgb_matrix.md
+++ b/docs/feature_rgb_matrix.md
@@ -236,6 +236,35 @@ void rgb_matrix_indicators_kb(void) {
A similar function works in the keymap as `rgb_matrix_indicators_user`.
+
+## Colors
+
+These are shorthands to popular colors. The `RGB` ones can be passed to the `setrgb` functions, while the `HSV` ones to the `sethsv` functions.
+
+|RGB |HSV |
+|-------------------|-------------------|
+|`RGB_WHITE` |`HSV_WHITE` |
+|`RGB_RED` |`HSV_RED` |
+|`RGB_CORAL` |`HSV_CORAL` |
+|`RGB_ORANGE` |`HSV_ORANGE` |
+|`RGB_GOLDENROD` |`HSV_GOLDENROD` |
+|`RGB_GOLD` |`HSV_GOLD` |
+|`RGB_YELLOW` |`HSV_YELLOW` |
+|`RGB_CHARTREUSE` |`HSV_CHARTREUSE` |
+|`RGB_GREEN` |`HSV_GREEN` |
+|`RGB_SPRINGGREEN` |`HSV_SPRINGGREEN` |
+|`RGB_TURQUOISE` |`HSV_TURQUOISE` |
+|`RGB_TEAL` |`HSV_TEAL` |
+|`RGB_CYAN` |`HSV_CYAN` |
+|`RGB_AZURE` |`HSV_AZURE` |
+|`RGB_BLUE` |`HSV_BLUE` |
+|`RGB_PURPLE` |`HSV_PURPLE` |
+|`RGB_MAGENTA` |`HSV_MAGENTA` |
+|`RGB_PINK` |`HSV_PINK` |
+
+These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h). Feel free to add to this list!
+
+
## Additional `config.h` Options
```C
diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md
index 97a995994..48277373a 100644
--- a/docs/feature_rgblight.md
+++ b/docs/feature_rgblight.md
@@ -191,7 +191,40 @@ If you need to change your RGB lighting in code, for example in a macro to chang
|`rgblight_decrease_val_noeeprom()` |Decrease the value for all LEDs. This wraps around at minimum value (not written to EEPROM) |
|`rgblight_set_clipping_range(pos, num)` |Set clipping Range |
-Additionally, [`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!
+## Colors
+
+These are shorthands to popular colors. The `RGB` ones can be passed to the `setrgb` functions, while the `HSV` ones to the `sethsv` functions.
+
+|RGB |HSV |
+|-------------------|-------------------|
+|`RGB_WHITE` |`HSV_WHITE` |
+|`RGB_RED` |`HSV_RED` |
+|`RGB_CORAL` |`HSV_CORAL` |
+|`RGB_ORANGE` |`HSV_ORANGE` |
+|`RGB_GOLDENROD` |`HSV_GOLDENROD` |
+|`RGB_GOLD` |`HSV_GOLD` |
+|`RGB_YELLOW` |`HSV_YELLOW` |
+|`RGB_CHARTREUSE` |`HSV_CHARTREUSE` |
+|`RGB_GREEN` |`HSV_GREEN` |
+|`RGB_SPRINGGREEN` |`HSV_SPRINGGREEN` |
+|`RGB_TURQUOISE` |`HSV_TURQUOISE` |
+|`RGB_TEAL` |`HSV_TEAL` |
+|`RGB_CYAN` |`HSV_CYAN` |
+|`RGB_AZURE` |`HSV_AZURE` |
+|`RGB_BLUE` |`HSV_BLUE` |
+|`RGB_PURPLE` |`HSV_PURPLE` |
+|`RGB_MAGENTA` |`HSV_MAGENTA` |
+|`RGB_PINK` |`HSV_PINK` |
+
+```c
+rgblight_setrgb(RGB_ORANGE);
+rgblight_sethsv_noeeprom(HSV_GREEN);
+rgblight_setrgb_at(RGB_GOLD, 3);
+rgblight_sethsv_range(HSV_WHITE, 0, 6);
+```
+
+These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h). Feel free to add to this list!
+
## Changing the order of the LEDs