toPalette

Given a color, try to find an associated palette entry for it. This will try to find the lowest numbered palette entry. The palette entry might be a higher numbered color than the terminal can support, if it does not support a 256 color palette.

toPalette

Parameters

c Color

a valid Color

numColors int

the size of the palette

Return Value

Type: Color

the palette Color closest matching c

Meta