LSR/394
< LSR
Der Inhalt dieser Seite wurde aus dem LilyPond Snippet Repository übernommen und steht unter folgender Lizenz: CC0. See Public Domain Help Pages for more info. |
Beschreibung
LilyPond supports named colors through x11-color, the corresponding color names can be found in the file scm/x11-color.scm. Using scheme, one can easily create a lilypond file displaying (all) supported color names with an example of each color automatically.
The way to do this is loading the scolor.scm file and then creating a \markup for each color definition.
%% http://lsr.di.unimi.it/LSR/Item?id=394
%% see also http://www.lilypond.org/doc/v2.18/Documentation/notation/list-of-colors
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% LSR workaround:
#(set! paper-alist (cons '("snippet" . (cons (* 80 mm) (* 130 mm))) paper-alist))
\paper {
#(set-paper-size "snippet")
tagline = ##f
indent = 0
}
\markup\vspace #.5
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#(ly:load "x11-color.scm")
% To show all available colors (~17 pages), replace
% (take x11-color-list 15) by x11-color-list
#(define-markup-list-command (listcolors layout props) ()
(interpret-markup-list layout props
(map (lambda (colorspec)
(markup #:with-color (x11-color (car colorspec))
#:filled-box '(-0.5 . 10) '(-1 . 3) 1
(symbol->string (car colorspec))))
(take x11-color-list 15))))
\markuplist \column-lines \listcolors
\markup "... (only the first 15 colors are shown)"
%% http://lsr.di.unimi.it/LSR/Item?id=394
%% see also http://www.lilypond.org/doc/v2.18/Documentation/notation/list-of-colors
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% LSR workaround:
#(set! paper-alist (cons '("snippet" . (cons (* 80 mm) (* 130 mm))) paper-alist))
\paper {
#(set-paper-size "snippet")
tagline = ##f
indent = 0
}
\markup\vspace #.5
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#(ly:load "x11-color.scm")
% To show all available colors (~17 pages), replace
% (take x11-color-list 15) by x11-color-list
#(define-markup-list-command (listcolors layout props) ()
(interpret-markup-list layout props
(map (lambda (colorspec)
(markup #:with-color (x11-color (car colorspec))
#:filled-box '(-0.5 . 10) '(-1 . 3) 1
(symbol->string (car colorspec))))
(take x11-color-list 15))))
\markuplist \column-lines \listcolors
\markup "... (only the first 15 colors are shown)"
Unterseiten
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