[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: couleurs rgb
From: |
Daniel Cartron |
Subject: |
Re: couleurs rgb |
Date: |
Fri, 27 Mar 2015 17:01:21 +0100 |
User-agent: |
KMail/4.13.3 (Linux/3.13.0-46-generic; KDE/4.13.3; x86_64; ; ) |
Le vendredi 27 mars 2015, 13:48:15 Gilles THIBAULT a écrit :
> #(define (mkRGB . args)
> (define (convert-rgb n) (/ n 256))
> (apply rgb-color (map convert-rgb args)))
> %% (apply fonc '(a b c d ..) => (fonc a b c d ..)
>
> #(display (mkRGB 0 127 256))
>
> \relative c' {
> \override NoteHead.color = #(mkRGB 0 128 256)
> c4 d e f
> }
effectivemement c'est encore plus compact, ça accepte 256 (alors que ça devrait
pas ;-) et ça marche mm sans transformer en inexact. Superbe !
Mon seul pb est que les valeurs rgb sont dans une variable...
#(define couleur '(0 128 256))
et là ça coince, In expression (0 128 256):
/tmp/frescobaldi-fuFEHd/tmpQdJS9G/bluesette.ly:57:14: Wrong type to apply: 0
Je devine bien pourquoi, mais je vois pas comment modifier...
--
Cordialement, Daniel Cartron
« L'idéal serait d'être d'une bonne santé contagieuse. »
Robert Sabatier - Le livre de la déraison souriante
Re: couleurs rgb, Daniel Cartron, 2015/03/26
- Re: couleurs rgb, Gilles THIBAULT, 2015/03/27
- Re: couleurs rgb,
Daniel Cartron <=
- Re: couleurs rgb, Gilles THIBAULT, 2015/03/28
- Re: couleurs rgb, Daniel Cartron, 2015/03/29
- Re: couleurs rgb, Daniel Cartron, 2015/03/29
- Re: couleurs rgb, Gilles THIBAULT, 2015/03/30
- Re: couleurs rgb, Daniel Cartron, 2015/03/30
Re: couleurs rgb, Olivier Miakinen, 2015/03/27
Re: couleurs rgb, Daniel Cartron, 2015/03/28