Meat
In C or C ++, is there a way to directly read the values of the RGB color palette? Of particular interest is the expanded color space used by xterm (and others) to define up to 256 terminal colors.
Potatoes
The thing is, I want to define my own colors (using ANSI escape sequences, for example, \e]4;3;rgb:cc/78/33\e\\or directly in c), but I need to save the colors of users before overriding them (in the unlikely event they have already redefined their colors) to restore them when my program ends. Unable to hide user settings.
Now I'm going to use ANSI escape sequences to do this in a client-side way. But since I cannot find how you get the colors, I start doing this with c or C ++.
The solution will be written as a ruby stone with a native extension (mostly built-in c or C ++ code), and I will try to get a cross-platform solution, although the main goal is OS X and, secondly, Linux environments ..
Cause
, , . ( ANSI). , escape- ANSI, . , - , - , ...
:
, - █ . , Linux 3 , (7 8), , :)
, "" ™ - ( - , ), , ). , , , . , :)