Skip to content

Add support for 256 color indexed palette#9

Open
pbutsykin wants to merge 7 commits intothe-eugen:masterfrom
pbutsykin:256_color_palette
Open

Add support for 256 color indexed palette#9
pbutsykin wants to merge 7 commits intothe-eugen:masterfrom
pbutsykin:256_color_palette

Conversation

@pbutsykin
Copy link

No description provided.

Signed-off-by: Pavel Butsykin <p.butsykin@gmail.com>
The cast to size_t is safe here since res == -1 is checked first.

Signed-off-by: Pavel Butsykin <p.butsykin@gmail.com>
Comparison is always true due to limited range of data type
[-Werror=type-limits].

Signed-off-by: Pavel Butsykin <p.butsykin@gmail.com>
Signed-off-by: Pavel Butsykin <p.butsykin@gmail.com>
Signed-off-by: Pavel Butsykin <p.butsykin@gmail.com>
Signed-off-by: Pavel Butsykin <p.butsykin@gmail.com>
Extend the foreground color API to support 256 color palette via
ESC[38;5INDEXm, while keeping backward compatibility with the basic 8
color SGR mode.
Palette indices are stored as idx+1 in vtr_fgcolor_t since value 0 is
reserved for VTR_COLOR_DEFAULT. This means index 255 would overflow
uint8_t, so it's mapped to VTR_COLOR_WHITE (the closest color match).

Signed-off-by: Pavel Butsykin <p.butsykin@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant