term.color_index

term

color_index(name) -> index

Give the palette index of a named color

Returns the index, 0 to 7, of the palette entry a name's 30 to 37 code sets: 0 for "black", 7 for "white". Returns nil for "reset", which names the default color and no palette entry, and for an unknown name.