Skip to content

terminal: Add palette support

Rastersoft requested to merge rastersoft/console:palette_support into main

Adds two GSetting entries: "palettes" and "themes", both with format "aas". They can contain an array of arrays of colors (in '#RRGGBBAA' format). The first array is for "light" mode, the second for "dark", and the third for "hacker". If there aren't enough entries defined, the first one will be used. This allows, for example, to define only one palette, which will be used in all modes.

"palettes" contains entries of 8, 16, 232 or 256 colors, and is used for the palette. "themes" contains entries of 2 colors, being the first the Foreground color and the second the background color for the specified mode.

The current palette and colors are defined as the default values in the GSettings, and if there is any parsing error, the program will fallback to them.

Fix #27

Edited by Rastersoft

Merge request reports

Loading