RGB colors: Difference between revisions
Appearance
Import snippet from LSR |
m Replace version="2.24.0" with version="2.24" now that the LilyWiki extension supports auto-selecting the latest release in a stable series |
||
| Line 1: | Line 1: | ||
In addition to the built-in x11-color system, it is possible to get exact RGB colors by specifying the amounts of red, green and blue. | In addition to the built-in x11-color system, it is possible to get exact RGB colors by specifying the amounts of red, green and blue. | ||
<lilypond version="2.24 | <lilypond version="2.24"> | ||
%% http://lsr.di.unimi.it/LSR/Item?id=420 | %% http://lsr.di.unimi.it/LSR/Item?id=420 | ||
Revision as of 18:54, 16 November 2025
In addition to the built-in x11-color system, it is possible to get exact RGB colors by specifying the amounts of red, green and blue.
\version "2.24"
%% http://lsr.di.unimi.it/LSR/Item?id=420
\relative c''{
\override Staff.StaffSymbol.color = #(x11-color 'SlateBlue2)
\set Staff.instrumentName = \markup {
\with-color #(x11-color 'navy) Clarinet
}
%black
\override Stem.color = #(rgb-color 0 0 0)
gis8 a
% white
\override Stem.color = #(rgb-color 1 1 1)
gis8 a
% dark blue
\override Stem.color = #(rgb-color 0 0 0.5)
gis4 a
}