Am 26.11.22 um 18:35 schrieb Lukas-Fabian Moser:
Am 26.11.22 um 18:11 schrieb David Kastrup:
\override NoteHead.color = red
actually lowers the barrier immensely compared with
\override NoteHead #'color = #red
red and #red are completely different Scheme entities.
Yes indeed (I suspect red gets parsed to #'red, no?).
Of course to #"red".
I never took the time to find out what's happening there behind the
scenes, but as a frequent user of the colors "darkred" and
"darkgreen", I'm a bit nervous about:
lukas@Aquarium:~/git/lilypond/scm(master)$ git grep darkred
color.scm: (darkred 0.54509803921568623 0 0)
output-lib.scm:(define-public darkred '(0.5 0.0 0.0))
lukas@Aquarium:~/git/lilypond/scm(master)$ git grep darkgreen
color.scm: (darkgreen 0 0.39215686274509803 0)
output-lib.scm:(define-public darkgreen '(0.0 0.5 0.0))
@everyone: Is this as it should be?
commit 1ea236291f96dbe583059f64a9b3048b413b6e0b
Author: Valentin Villenave <valen...@villenave.net>
Date: Fri May 22 12:46:11 2020 +0200
Allow CSS-style colors anywhere
- Add support for setting the 'color property to a
string instead of a list (as a grob and a stencil property).
Hexadecimal color codes may include an alpha channel.
- rgb-color now accepts an optional fourth channel,
that is ignored in PostScript output but will result
in rgba() colors in SVG.
The next step would be, ideally, to figure out a way
of enabling semi-transparency also in PDF output.
Two possible ways would be to use either the
SetTransparency pdfmark feature, or GhostScript-specific
functions such as .setopacityalpha. The latter is
actually being renamed .setfillconstantalpha, see
https://git.ghostscript.com/?p=ghostpdl.git;f=examples/transparency_example.ps;hb=HEAD
- Add the appropriate Scheme functions to parse
CSS-style color codes, and add support in both PS
and SVG backends (in SVG the color string gets passed
directly, thus avoiding any rounding modification).
- Add input/regression/color-css.ly for the new
syntax, and alter input/regression/color.ly to
include a semi-transparent grob. Both tests should
result in the same graphical output in either backend.
- Update LM, NR and Changes; also document predefined
CSS colors (previously only available through the
undocumented css-color function).
https://gitlab.com/lilypond/lilypond/-/merge_requests/53
Lukas