[PD] data structures - color?

Hans-Christoph Steiner hans at eds.org
Fri Mar 24 03:07:17 CET 2006


On Mar 23, 2006, at 7:49 PM, Frank Barknecht wrote:

> Hallo,
> João Miguel Pais hat gesagt: // João Miguel Pais wrote:
>
>> I just made a patch to see which colors are available in the data
>> structures. it seems that they're not the same as in the normal pd  
>> scheme,
>> and that they repeat themselves. is it normal that colors 0 == 100  
>> == 200
>> == 300, 400 == 500 and 600 == 700?
>
> By definition these are not the same, though they really look like it
> and they show the same rgb-values when captured and tested in the
> Gimp. Strange.
>
>> wouldn't it be useful for all color schemes to be synchronised?
>
> Surely, however as it currently is, we have at least 3 color schemes
> in Pd and Gem: IEM colors, which nobody really understands, Gem
> colors, which are lists of R G B values with R G and B going from 0 to
> 1, and data structure colors which are similar to Gem colors, but R G
> and B go from 0 to 9 instead of from 0 to 1 and they can only be
> integers and they are not lists but concatenated numbers.
>
> So:
> Black Gem: 0 0 0
> Black DS:  000
> Red Gem:   1 0 0
> Red DS:    900 (^= "9 * 1 0 0")
> White Gem: 1 1 1
> White DS:  999 (^= "9 * 1 1 1")
>

The whole color thing is a bit of a mess.  I think that the Gem float  
RGB scheme should be adopted everywhere.  In fact, I think that since  
Pd is all about floats, we should make the default range 0-1 for  
everything unless there is a really good reason to do otherwise.   
This includes sliders, GUIs like [grid], [gcanvas], [knob], colors,  
etc.   (things related to audio signals often need -1 to 1, but its  
basically the same idea).

In the process of writing the mapping lib with Cyrille, I have really  
seen the power of using the same data range.  It allows you to do  
things on a logic level without having to think about math.  But math  
is still an option.  FYI: the mapping lib objects all accept 0-1 and  
output 0-1.  Even things like angles are outputted 0-1 instead of -pi  
to pi or 0-360.

.hc



________________________________________________________________________ 
____

Using ReBirth is like trying to play an 808 with a long stick.
                                               -David Zicarelli





More information about the Pd-list mailing list