New function css-color (accompanying x11-color)
I was asked if LilyPond could support choosing colors by their CSS name,
which I found a reasonable wish.
This commit makes make-x11-color-handler generic and specifies
a new function css-color. From this it would be easy to also add further
namespaces and color lists.
CSS colors are case insensitive, so this commit also provides support for
this. Incidentally, a warning is now issued when the requested color is
not defined (instead of silently falling back to black).
Diff:
I will document this when review shows no initial objections against the addition
Test case:
Passes make, make check and a full make doc
Patch on countdown for Jun 7th
Discussion showed there are some conceptual issues to discuss.
Reviewers: ,
Message:
This is a follow-up patch to
https://codereview.appspot.com/570690043/
For some reason it was uploaded as a new patch,
and Issue
https://sourceforge.net/p/testlilyissues/issues/5524/
wasn't updated.
This new patch attempts a cleaner separation of color
definitions between X11 and CSS colors, avoiding
duplication.
As with the original patch, I'll document it when
there's basic agreement.
Description:
New function css-color
X11 and CSS colors are now independently accessible through #(x11-color
<name>)
or #(css-color <name>).</name></name>
Both color models are now completely case insensitive (as they should
be),
and spaces are simply stripped from the argument. That way all
combinations
of symbols/strings, CamelCased or lowercase etc. are accepted.
If no color is found by the requested name a warning is issued
(unfortunately that can't be an input warning).
Please review this at https://codereview.appspot.com/580780043/
Passes make, make check and a full make doc.
Diff:
Patch on countdown for June 7th
Patch counted down - please push
Patch counted down - please push
Patch counted down - please push
Patch counted down - please push
Patch counted down - please push