summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorPatrick Stadler <patrick.stadler@gmail.com>2021-07-22 08:46:12 +0200
committerGitHub <noreply@github.com>2021-07-21 23:46:12 -0700
commitfb9a254a432e307e82c9dce45e1aba2cf21fa339 (patch)
treee4fc4e5464764d421d89ad0e6189a77e03d68851 /docs
parent85128302c83b7d8b2525f371c96b46ae79aac801 (diff)
Retain brightness with lighting layers (#13025)
Add guard `RGBLIGHT_LAYERS_RETAIN_VAL` to retain the currently used val when applying lighting layers.
Diffstat (limited to 'docs')
-rw-r--r--docs/feature_rgblight.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md
index d323dee4f7..8484586c05 100644
--- a/docs/feature_rgblight.md
+++ b/docs/feature_rgblight.md
@@ -326,6 +326,10 @@ would turn the layer 0 (or 1) on and off again three times when `DEBUG` is press
Normally lighting layers are not shown when RGB Lighting is disabled (e.g. with `RGB_TOG` keycode). If you would like lighting layers to work even when the RGB Lighting is otherwise off, add `#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF` to your `config.h`.
+### Retain brightness
+
+Usually lighting layers apply their configured brightness once activated. If you would like lighting layers to retain the currently used brightness (as returned by `rgblight_get_val()`), add `#define RGBLIGHT_LAYERS_RETAIN_VAL` to your `config.h`.
+
## Functions
If you need to change your RGB lighting in code, for example in a macro to change the color whenever you switch layers, QMK provides a set of functions to assist you. See [`rgblight.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight/rgblight.h) for the full list, but the most commonly used functions include: