bug-lilypond
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Issue 490 in lilypond: RGB coloring notes in svg


From: codesite-noreply
Subject: Issue 490 in lilypond: RGB coloring notes in svg
Date: Mon, 08 Oct 2007 15:38:25 -0700

Issue 490: RGB coloring notes in svg
http://code.google.com/p/lilypond/issues/detail?id=490

New issue report by gpermus:
% personal request from Graham

I'd like to change the color of notes in the SVG output without using
lilypond.  I use this input file:
----
colorNote = #(define-music-function (parser location color) (string?)
 #{
   \once \override Stem #'color = #(x11-color $color)
   \once \override NoteHead #'color = #(x11-color $color)
 #})
up = \markup{ \hspace #0.5 \arrow-head #Y #LEFT ##f }
down = \markup{ \hspace #0.5 \arrow-head #Y #RIGHT ##f }
\version "2.10.0"
\score{
{
\colorNote "black" c'4
\colorNote "red" d'8
\colorNote "green" e'
\colorNote "blue" f'4
\colorNote "white" g'
a'4.
b'8
c''2
}
\layout{}
}
------

to produce a .svg file.  Unfortunately, the notes are written in a
seemingly-random order.  The svg file contains elements such as
---
<g color="rgb(100%,0%,0%)"
----
but they do not appear in order (ie not black, red, green, etc).  To avoid
this problem, I would like to write arbitrary RGB values -- this will let
me select individual notes to color (with a sed script).

In other words, I would like to do:
...
\score{
{
\colorNote #RGB(0,0,0) c'4
\colorNote #RGB(0,0,1) d'8
\colorNote #RGB(0,0,2) e'
\colorNote #RGB(0,0,3) f'4
...


then my post-lilypond script can change the colors of individual notes by
searching for the appropriate number(s).



Issue attributes:
        Status: Accepted
        Owner: gpermus
        Labels: Type-Enhancement Priority-Medium

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings




reply via email to

[Prev in Thread] Current Thread [Next in Thread]