sexe
sexe copied to clipboard
Figure out color scheme|styles.
As more elements become interactive and highlighted, the question of color scheme becomes more important. Points: – What colors should be used and in what context (say activeColor, errorColor, baseColor, textColor), – Is it reasonable to rely on ANSI color constants. If they're defined by user, there is a chance positive effect will be negated. Workaround – set all colors as rgb values explicitly.
I like using the terminal's defined colors. That way it will always look nice with the user's terminal.
The only important consideration here is to make sure that if we ever style background colors, we must style the text on top of it to make sure that the text will be visible.
I also like defining some colors to be used in specific contexts (like error_color
for example). Having predefined colors will help for possible future UI expansions (like a different graphing context for multi-variable functions).
Okay, so if with their color scheme something doesn't look interactive, they can always change it, this works. For color contexts, I propose declaring a mapping like Config::ColorError -> Color::Red
and using values from mapping rather than ones from tui