Open gabalafou opened 6 months ago
for what it is worth the 8 colors defined by ansi for terminals are, Black Red Green Yellow Blue Magenta Cyan White, From what I can see the main difference is here we have
commentand orange in extra;
purple(instead of magenta); and
white` missing.
(also I should check but I don't think the Color class has any particular needs, so we might as well also make it am Enum
, and will have proper way of listing fields and type checking.
See #35 as well.
Do all the themes have something like 8 ANSI colours + comment? @gabalafou @Carreau since you both looked at this recently.
If so that would give us a relatively uniform palette for the themes. If we decide to add different support per #32, then that would make ANSI + comment + extras (purple/orange).
If not -- as in the themes have really different colours and no apparent base palette - then chaos reigns.
(also I should check but I don't think the Color class has any particular needs, so we might as well also make it am Enum, and will have proper way of listing fields and type checking.
AFAIK there are no particular needs/requirements that must be met here so we cal always go down the enum
route.
Well roughly yes the themes use about the same colors. Things is the Color class itself is unnecessary for the theme, it is just used as a convenience to refer to a limited set of colors.
I think it would make sens to have some consistency. I'll try to look at which themes differs from others.
Colors used "only" in a few themes:
Colors "missing" in a few themes:
"Yellow" is present in 9 themes out of 16, so meh.
Maybe this is something we should think about and have all define the same set of keys ?
_Originally posted by @Carreau in https://github.com/Quansight-Labs/accessible-pygments/pull/42#discussion_r1541012174_