About

PaletteKnife lets you use thousands of high-quality color palettes from "cpt-city" in your FastLED animations.

Getting Started

A basic understanding of FastLED color palettes is absolutely required.

To get started with FastLED color palettes, run the FastLED "ColorPalette" example, and review the included notes/comments to refresh your understanding of what FastLED color palettes are, and how to program with them. If you skip this step, nothing that follows will make sense or work. It's not too complicated, but there is no substitute for hands-on experience here.

A second palette-use example, "Fire2012WithPalette", is also included with FastLED.

Installing PaletteKnife

CHROME or SAFARI is REQUIRED; will NOT work with FF or IE (or NCSA Mosiac).

Drag this bookmarklet into a browser toolbar: [PaletteKnife]

Using PaletteKnife

  1. Go to cpt-city here, http://soliton.vm.bytemark.co.uk/pub/cpt-city/
  2. Find a palette you like, e.g. http://soliton.vm.bytemark.co.uk/pub/cpt-city/rc/tn/purplefly.png.index.html
  3. Click PaletteKnife in your toolbar. If you get warnings, choose a different palette and try again.
  4. Copy the resulting code and paste it into your source file.
  5. Use your new color palette by name (e.g. "purplefly_gp") as you would any other FastLED pre-defined color palette (e.g. "RainbowColors_p").

Example:

CRGBPalette16 myPal = purplefly_gp;

then

static uint8_t index = 0;
index++;
fill_palette( leds, NUM_LEDS, index, 6, myPal);

or

leds[i] = ColorFromPalette( myPal, index);

Going Further

  • The maintainer of cpt-city has graciously said that FastLED developers are welcome to use PaletteKnife; please be courteous and gracious in return. cpt-city is a fantastic resource, please treat it with respect and gratitude!