Skip to content

Commit

Permalink
Merge pull request #1376 from EvyBongers/docs/Colormap-Overlay
Browse files Browse the repository at this point in the history
Fix readme and example
  • Loading branch information
obra authored Jan 9, 2024
2 parents 3bc565c + e6e85c0 commit 74e3963
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
17 changes: 8 additions & 9 deletions plugins/Kaleidoscope-Colormap-Overlay/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Colormap-Overlay

The `ColormapOverlay` extension provides an easier way to apply color to
specific combinations of keys and layers, regardless of the active LED mode.
Colors are picked from a 16-color palette, provided by the
[LED-Palette-Theme][plugin:l-p-t] plugin. The overlays are stored in `EEPROM`,
and can be easily changed via the [FocusSerial][plugin:focusserial] plugin,
which also provides palette editing capabilities.
This plugin provides an easier way to apply color to specific combinations of
keys and layers, regardless of the active LED mode. Colors are picked from a
16-color palette, provided by the [LED-Palette-Theme][plugin:l-p-t] plugin. The
overlays are stored in `EEPROM`, and can be easily changed via the
[FocusSerial][plugin:focusserial] plugin, which also provides palette editing
capabilities.

[plugin:focusserial]: Kaleidoscope-FocusSerial.md
[plugin:l-p-t]: Kaleidoscope-LED-Palette-Theme.md
Expand Down Expand Up @@ -37,7 +37,6 @@ key coordinates refer to the relevant header file:
#include <Kaleidoscope.h>
#include <Kaleidoscope-LEDControl.h>
#include <Kaleidoscope-LED-Palette-Theme.h>
#include <Kaleidoscope-Colormap.h> // DefaultColorMap
#include <Kaleidoscope-Colormap-Overlay.h>
#include <Kaleidoscope-FocusSerial.h>

Expand All @@ -48,7 +47,7 @@ PALETTE(
KALEIDOSCOPE_INIT_PLUGINS(EEPROMSettings,
LEDControl,
ColormapOverlay,
DefaultColormap,
DefaultPalette,
Focus);

void setup() {
Expand All @@ -62,7 +61,7 @@ void setup() {
)

ColormapOverlay.setup();
DefaultColormap.setup();
DefaultPalette.setup();
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include <Kaleidoscope.h>
#include <Kaleidoscope-LEDControl.h>
#include <Kaleidoscope-LED-Palette-Theme.h>
#include <Kaleidoscope-Colormap.h> // DefaultColorMap
#include <Kaleidoscope-Colormap-Overlay.h>

// clang-format off
Expand Down Expand Up @@ -64,10 +63,10 @@ enum {
};

PALETTE(
[PALETTE_RED] = CRGB(0xff, 0x00, 0x00),
[PALETTE_GREEN] = CRGB(0x00, 0xff, 0x00),
[PALETTE_YELLOW] = CRGB(0x00, 0x00, 0xff),
[PALETTE_BLACK] = CRGB(0x00, 0x00, 0x00),
[PALETTE_RED] = CRGB(0xff, 0x00, 0x00),
[PALETTE_GREEN] = CRGB(0x00, 0xff, 0x00),
[PALETTE_BLUE] = CRGB(0x00, 0x00, 0xff),
[PALETTE_BLACK] = CRGB(0x00, 0x00, 0x00),
// unused
[PALETTE_UNUSED_1] = CRGB(0x00, 0x00, 0x00),
[PALETTE_UNUSED_2] = CRGB(0x00, 0x00, 0x00),
Expand All @@ -85,7 +84,7 @@ PALETTE(
KALEIDOSCOPE_INIT_PLUGINS(EEPROMSettings,
LEDControl,
ColormapOverlay,
DefaultColormap);
DefaultPalette);

void setup() {
Kaleidoscope.setup();
Expand All @@ -95,14 +94,14 @@ void setup() {
kaleidoscope::plugin::Overlay(0, KeyAddr(0, 9), PALETTE_GREEN),
// Make numlock red
kaleidoscope::plugin::Overlay(0, KeyAddr(0, 15), PALETTE_RED),
// Make escape yellow
kaleidoscope::plugin::Overlay(0, KeyAddr(2, 6), PALETTE_YELLOW),
// Make escape blue
kaleidoscope::plugin::Overlay(0, KeyAddr(2, 6), PALETTE_BLUE),
// Disable leds on the palm keys
kaleidoscope::plugin::Overlay(0, KeyAddr(3, 6), PALETTE_BLACK),
kaleidoscope::plugin::Overlay(0, KeyAddr(3, 9), PALETTE_BLACK))

ColormapOverlay.setup();
DefaultColormap.setup();
DefaultPalette.setup();
}

void loop() {
Expand Down

0 comments on commit 74e3963

Please sign in to comment.