Mising $Palette from ENV
I was messing around for hours trying to figure out how to know what palette color's the terminal is currently using. I am writing a program that spits out ansi-4bit colors when configured to. ansi 4 bit colors require a palette. I need to fetch this palette from a bash variable that doesn't exist. Also the $Palette could be different from window to window so it's kind of important that I fetch the right data. The reason is the color conversion from RGB to ANSI 4 bit colors needs an accurate palette data from the CLI in order to properly fetch the colors.
Solution:
- add $PaletteName a unique id or readable human name. this should get added before the shell has been executed similar to how terminals set $TERM and $COLORTERM before executing the bash specifically only for their window.
- add $Palette an rgb or rgba list from 0-15 indices
Edited by jredfox fox