Skip to content

Documentation / @ripl/terminal / colorToAnsiBg

Function: colorToAnsiBg()

colorToAnsiBg(color): string

Defined in: terminal/src/color.ts:26

Converts a CSS color string to an ANSI truecolor background escape sequence. Returns empty string for invalid/transparent colors.

Parameters

ParameterType
colorstring

Returns

string