]> git.donarmstrong.com Git - lilypond.git/commitdiff
Compile fix and x11 docs from Bernard.
authorGraham Percival <graham@percival-music.ca>
Tue, 26 Apr 2005 08:50:09 +0000 (08:50 +0000)
committerGraham Percival <graham@percival-music.ca>
Tue, 26 Apr 2005 08:50:09 +0000 (08:50 +0000)
ChangeLog
Documentation/user/advanced-notation.itely

index f2ba5daf73075e128754894dca62abc45d2bd6d3..70d601fc68c064b7e96d35b727fd43a6fd176ba3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,9 @@
        changing-defaults.itely: minor fixes.  Added docs
        for colors to advanced-notation.itely.
 
+       * Documentation/user/advanced-notation.itely: fixed compile
+       problem and added Bernard's x11-color doc patch.
+
 2005-04-25  Jan Nieuwenhuizen  <janneke@gnu.org>
 
        * scm/output-ps.scm (grob-cause): Yet another fix, hope it's
index 86d64254555932f05d04d0aaa6273adba693d276..27cc9559865511b0123ba4802f20fc9b9e04ad4e 100644 (file)
@@ -1715,11 +1715,11 @@ This example demonstrates how to place prefatory matter
 
 
 @node Coloring objects
-@section Coloring objects
+@subsection Coloring objects
 
 @c FIXME: need link to missing list of colors
 Individual objects may be assigned colors.  You may use color names
-listed HERE or the x11 color names listed THERE.
+listed HERE
 
 @lilypond[quote,raggedright,verbatim,fragment]
 \override NoteHead #'color = #red
@@ -1730,6 +1730,62 @@ d
 e
 @end lilypond
 
+The full range of colors defined for X11 can be accessed by using the
+scheme function x11-color.  The function takes one argument that can be a
+symbol
+
+@example
+\override Beam #'color = #(x11-color 'MediumTurquoise)
+@end example
+
+or a string
+
+@example
+\override Beam #'color = #(x11-color "MediumTurquoise")
+@end example
+
+The first form is quicker to write and is more efficient.  However, using
+the second form it is possible to access X11 colors by the multi-word
+form of its name
+
+@example
+\override Beam #'color = #(x11-color "medium turquoise")
+@end example
+
+If x11-color cannot make sense of the parameter then the color returned
+defaults to black.  It should be obvious from the final score that
+something is wrong.
+
+This example, illustrates the use of x11-color.  Notice that the stem
+color remains black after being set to (x11-color 'Boggle), which is
+deliberate nonsense.
+
+@lilypond[quote,raggedright,verbatim]
+{
+  \override Staff.StaffSymbol #'color = #(x11-color 'SlateBlue2)
+  \set Staff.instrument = \markup {
+    \with-color #(x11-color 'navy) "Clarinet"
+  }
+  \time 2/4
+  gis''8 a''
+  \override Beam #'color = #(x11-color "medium turquoise")
+  gis'' a''
+  \override NoteHead #'color = #(x11-color "LimeGreen")
+  gis'' a''
+  \override Stem #'color = #(x11-color 'Boggle)
+  gis'' a''
+}
+@end lilypond
+
+
+@refbugs
+Not all x11 colors are distinguishable in a web browser.  For web use
+normal colors are recommended. 
+
+An x11 color is not necessarily exactly the same shade as a similarly
+named normal color. 
+
+
 @seealso
 
 COLORLIST