Lilypond Music einfärben
Zur Navigation springen
Zur Suche springen
Alle Objekte einer Stimme einfärben (Noten, Bögen, ...)
#(ly:load "x11-color.scm")
colorGrob =
#(define-music-function (my-grob my-color color-on)
(symbol? color? boolean?)
;; check for the boolean argument
(if color-on
;; either set the color for the grob type
#{
\temporary \override #my-grob #'color = #my-color
#}
;; or revert it
#{
\revert #my-grob #'color
#}))
colorGrobs =
#(define-music-function (my-grob-list my-color color-on)
(symbol-list? color? boolean?)
(if (null? my-grob-list)
;; issue an empty music expression
#{ #}
#{
% color the first grob type of the current list
\colorGrob #(car my-grob-list) #my-color #color-on
% recursively call itself with the remainder
% of the current list.
\colorGrobs #(cdr my-grob-list) #my-color #color-on
#}))
allGrobNames =
#(define-scheme-function (parser location)()
;; create a list with all grob names from LilyPond
(map (lambda (gd) (car gd)) all-grob-descriptions))
colorMusic =
#(define-music-function (my-color music)
(color? ly:music?)
#{
\colorGrobs \allGrobNames #my-color ##t
#music
\colorGrobs \allGrobNames #my-color ##f
#})
#(ly:load "x11-color.scm")
colorGrob =
#(define-music-function (my-grob my-color color-on)
(symbol? color? boolean?)
;; check for the boolean argument
(if color-on
;; either set the color for the grob type
#{
\temporary \override #my-grob #'color = #my-color
#}
;; or revert it
#{
\revert #my-grob #'color
#}))
colorGrobs =
#(define-music-function (my-grob-list my-color color-on)
(symbol-list? color? boolean?)
(if (null? my-grob-list)
;; issue an empty music expression
#{ #}
#{
% color the first grob type of the current list
\colorGrob #(car my-grob-list) #my-color #color-on
% recursively call itself with the remainder
% of the current list.
\colorGrobs #(cdr my-grob-list) #my-color #color-on
#}))
allGrobNames =
#(define-scheme-function (parser location)()
;; create a list with all grob names from LilyPond
(map (lambda (gd) (car gd)) all-grob-descriptions))
colorMusic =
#(define-music-function (my-color music)
(color? ly:music?)
#{
\colorGrobs \allGrobNames #my-color ##t
#music
\colorGrobs \allGrobNames #my-color ##f
#})
Links
- Liypond Musik einfärben
- Liste der X11-Farben generieren
- Liste der X11-Farben mit Farbmuster
- Farben in Lilypond
- Tabelle von Goldschattierungen
- Liste der CSS Farben mit Farbmuster
- Liste der 140 HTML Standard Farbnamen mit Hex- und RGB Code
- LSR Mirror #394: Using Scheme to create a list of all available X11 colors
- Farbnamen in der Vollversion von SVG 1.1
- Notation: A.7 List of colors
- Notation: Farbige Objekte
- Color Picker auf w3schools