Quansight-Labs / accessible-pygments

♿ Accessible pygments themes
https://quansight-labs.github.io/accessible-pygments/
BSD 3-Clause "New" or "Revised" License
12 stars 5 forks source link

Should all Colors class define the same color? #47

Open gabalafou opened 6 months ago

gabalafou commented 6 months ago
          I don't see a better way, I though maybe all Colors class define the same color, but no:
  16     black
  16     blue
  16     comment
   2     cyan
  16     green
  16     orange
  16     purple
  13     red
  10     yellow

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_

Carreau commented 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 havecommentand orange in extra;purple(instead of magenta); andwhite` missing.

Carreau commented 6 months ago

(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.

Carreau commented 6 months ago

See #35 as well.

trallard commented 5 months ago

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.

Carreau commented 5 months ago

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.

Carreau commented 5 months ago

Colors used "only" in a few themes:

Colors "missing" in a few themes:

"Yellow" is present in 9 themes out of 16, so meh.