Closed GarkGarcia closed 4 years ago
This is a follow up to https://github.com/asciidoctor/asciimath/issues/34#issuecomment-627300328.
For reference, the official documentation of xcolor
can be found in here:
http://mirrors.ctan.org/macros/latex/contrib/xcolor/xcolor.pdf
The names included in COLOURS
are taken from section 4.1 of the document.
Note that I'm nothing making it so that color(name)(x) is rendered as {\color{name} x}
Perfect. The way you've done this with a reverse rgb to name lookup table is indeed the way to go. The names in the parser reflect the MathML/HTML4 names/rgb values and those aren't necessarily the same in xcolor. :+1:
Note that I'm nothing making it so that
color(name)(x)
is rendered as{\color{name} x}
(that would be incorrect). I'm only making it socolor(#rrggbb)(x)
is rendered as{\color{<name of #rrggbb>} x}
instead of{\color[RGB]{rr, gg, bb} x}
whenever#rrggbb
has a name in thexcolor
TeX package.