[PD-dev] 'cnv' colors

Luke Iannini lukexipd at gmail.com
Mon Jul 7 21:34:30 CEST 2008


Hi Mike,
I made some objects to handle this in senderfruit/ (in extended)
called color.rgb2pd24 (message color format) and color.rgb2pd18 (file
color format).  They both take lists of three RGB values scaled 0-1.

There's also color.hsl2rgb, which as you'd expect converts from HSL
colorspace to RGB.  HSL is useful for generating variants of a color
(like a darker or lighter version).

Cheers
Luke

On Mon, Jul 7, 2008 at 11:53 AM, Mike McGonagle <mjmogo at gmail.com> wrote:
> Hum, Thanks for this Frank. One question though, as it appears from what is
> in the docs (all the numbers are "doubled", ie 1 = 0x11, a = 0xaa, etc.), do
> these colors represent what you would get from the colors that get stored in
> the Pd file? In other words, the 8bit format for the colors?
>
> Thanks again.
>
> Mike
>
>
> On Mon, Jul 7, 2008 at 1:17 PM, Frank Barknecht <fbar at footils.org> wrote:
>>
>> Hallo,
>> Claude Heiland-Allen hat gesagt: // Claude Heiland-Allen wrote:
>>
>> > Mike McGonagle wrote:
>> > > Hello all,
>> > >
>> > > I have a program that I have written that creates lots of small 'cnv'
>> > > objects, where I am changing the colors of the backgrounds and the
>> > > text in
>> > > the object. I was noticing that when I create these cnv objects, I
>> > > have to
>> > > use a different 'color number' to get the same color when I change it
>> > > with
>> > > the cnv 'color' message (which changes both the background and text
>> > > colors
>> > > in the same message).
>> > >
>> > > Is this documented anywhere as to the relation between these two
>> > > different
>> > > color definitions?
>> >
>> > Not as far as I'm aware, but here's my implementations that work for me:
>>
>> Also see this colorschemer for Pd:
>> http://lists.puredata.info/pipermail/pd-list/2006-03/036005.html
>>
>> Ciao
>> --
>>  Frank Barknecht                                     _ ______footils.org__
>>
>> _______________________________________________
>> Pd-dev mailing list
>> Pd-dev at iem.at
>> http://lists.puredata.info/listinfo/pd-dev
>
>
>
> --
> Peace may sound simple—one beautiful word— but it requires everything we
> have, every quality, every strength, every dream, every high ideal.
> —Yehudi Menuhin (1916–1999), musician
> _______________________________________________
> Pd-dev mailing list
> Pd-dev at iem.at
> http://lists.puredata.info/listinfo/pd-dev
>
>




More information about the Pd-dev mailing list