prepare

open override fun prepare(numLEDs: Int): PreparedColorContainer

Prepare these colors for use with a LED strip by creating a collection of colors that blend between multiple colors along the 'strip'.

The palette colors are spread out along the strip at approximately equal intervals. All pixels between these 'pure' pixels are a blend between the colors of the two nearest pure pixels. The blend ratio is determined by the location of the pixel relative to the nearest pure pixels.

If the ColorContainer has more colors than there are pixels in the strip, some colors will be dropped.

If the ColorContainer is empty, the resulting PreparedColorContainer will contain 0s.

Return

A PreparedColorContainer containing all the calculated colors

TODO: Support preparing based on location rather than index

Parameters

numLEDs

The number of LEDs to create colors for