colorformat: extend with `ansi<name>` ?

Issue #1183 resolved
Matthias Bussonnier
created an issue

I'm looking around the Terminal256/TerminalFormatter, and would like to use the Terminal256 to generate base ansi escape sequence for some specific style.

So I would like to define some style in the form:

    styles = {
        Token.type:     "#ansired", 
...

Would a PR that would alter what is a valid color format be accepted ? In particular I'm thinking of allowing a limited, whitelisted number of name for color, for example from #ansiblack to #ansiwhite (potentially also allowing the aliases defined in pygments console, like teal, darkteal...).

I don't really care of the special format, I can adapt to whatever you guys like, I just want Term256 formatter to be able to know it should emit for some colors \x1b[3x;ym (x in [1-7]), instead of the \x1b[38;5;nm.

Does what I say make any sens or is clear enough, or should I try to re-explain better ?

Comments (1)

  1. Log in to comment