Customizing LED colors

I got my Keyboardio a couple of weeks ago and have had a lot of fun customizing it and figuring everything out. What I would like to do next is customize the LEDs a bit but I am having trouble figuring it out. I want static colors but to chose different colors for individual keys. I would prefer to color the keys by the row/column instead of the keycode so it won’t change when I am on different layers.

A few things I have tried:
Using LEDcontrol.setCrgbAt() in my ino file. I wasn’t sure where to put it so I added it to the end of the void setup() { section like this LEDControl.setCrgbAt(3, 14, CRGB(0x00, 0xff, 0xff));. This was just a test to see if it would color that key and it built fine but it didn’t color that key. This would be my preferred method as I could set each individual key regardless of the layer or what the keycode is so if there are any examples or docs on how to do this it would be great.

Using the LEDEffects plugin. The end result of this is pretty close to what I want but I don’t like how the colors change when using fn layer. For example the h key changes to the modifier color after using it with fn for the arrow. Also I am not a fan of the two color schemes but I could always fork the github and modify it for different colors.

Using the FingerPainter plugin. I couldn’t get this to work but didn’t try that hard. I would much rather code the colors so it would be easier to tweak it and wasn’t sure if the colors stayed after reboots/flashes.

I have also searched through the forums and the github for code examples and to see what other people who are doing led stuff are using but most of them are much more complex then what I need. Any help would be appreciated. Thanks!

For the LED effects to take effect, you need to call LEDControl.syncLeds() too. Mind you, your active LED mode will override whatever you set up in your setup() method.

I think the best way for you would be to write a custom LEDMode, and simply use that mode only. The skeleton for that is something like this:

// MyLEDMode.h

#pragma once

#include <Kaleidoscope.h>
#include <Kaleidoscope-LEDControl.h>

namespace kaleidoscope {
class MyLEDEffect : public LEDMode {
  MyLEDEffect() {}

  void onActivate() final;

extern kaleidoscope::MyLEDEffect MyLEDEffect;
// MyLEDEffect.cpp

#include "MyLEDEffect.h"

namespace kaleidoscope {

void MyLEDEffect::onActivate() {
  LEDControl.setCrgbAt(3, 14, CRGB(0x00, 0xff, 0xff));
  // Set up the rest of the colors whatever way you want to.

kaleidoscope::MyLEDEffect MyLEDEffect;

I’d happily take PRs that add new colorways there, assuming they follow the same principle. If they don’t, they’re better off as a separate plugin.

Mm… yeah, getting FingerPainter to work is not easy. But it does save the results to EEPROM, so they’ll persist through reboots and reflashes.