# Customizing LED colors

**URL:** <https://community.keyboard.io/t/customizing-led-colors/1821>\
**Category:** Help and Getting Started\
**Tags:** question\
**Created:** [July 20, 2018, 2:20am UTC](https://community.keyboard.io/t/customizing-led-colors/1821 "2018-07-20T02:20:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![salimundo](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/salimundo/32/1944_2.png) [@salimundo](https://community.keyboard.io/u/salimundo)\
**Post date:** [July 20, 2018, 2:20am UTC](https://community.keyboard.io/t/customizing-led-colors/1821/1 "2018-07-20T02:20:37Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![algernon](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/algernon/32/4404_2.png) [@algernon](https://community.keyboard.io/u/algernon)\
**Post date:** [July 20, 2018, 5:36am UTC](https://community.keyboard.io/t/customizing-led-colors/1821/2 "2018-07-20T05:36:30Z")

</div>

> [@salimundo](#):
>
> 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.

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:

```c++
// MyLEDMode.h

#pragma once

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

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

  void onActivate() final;
};
}

extern kaleidoscope::MyLEDEffect MyLEDEffect;

```

```c++
// 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;

```

> [@salimundo](#):
>
> 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.

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.

> [@salimundo](#):
>
> 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.

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.
