|
|
|
|
|
by ASVVVAD
2177 days ago
|
|
Can you link me to a way to use colours that change with the terminal colour preset? I haven't come across anything like that or maybe didn't pay attention. It would be really helpful You said you can't even set an env variable to change them so I assume that there is an even better way? |
|
I've got some Go code that you can reuse if you want to the escape codes in Go: https://github.com/lmorg/murex/blob/master/utils/ansi/codes....
Just bare in mind that any numbers you see in documentation are sent as ASCII values rather than integers. eg `ESC[31m` (red text) should be sent to the terminal as
Though, as you know, most languages will have some syntactic sugar to translate characters to their ASCII values, eg so at least you don't have to write all those values by hand.