[PD] data structures - color?
IOhannes m zmoelnig
zmoelnig at iem.at
Sat Mar 25 22:39:53 CET 2006
Mathieu Bouchard wrote:
> On Thu, 23 Mar 2006, Hans-Christoph Steiner wrote:
>
>
>>The whole color thing is a bit of a mess. I think that the Gem float
>>RGB scheme should be adopted everywhere.
>
>
> In GF it would be difficult if using the default int types à la GEM.
> However, unlike GEM and PDP, GF also supports float images, so if you
> really want to use float colors in GF, you can do it.
>
where do you see any difficulties?
the question is how the colours are represented in "pd number space"
(this is: the numbers you see in numberboxes).
Gem uses internally "unsigned char" to represent numbers, pdp uses
"short" and GF uses various types.
however, when you set a colour in Gem, you say "1.f 0.f 0.f" and not
"0xff 0xff 0xff"; the user need not know about how the numbers are
handled internally (sometimes they will have to, e.g. when it comes to
rounding errors)
i think hc's idea is (and i very much like it), that you could also set
the iemgui's colours with something like "1.f 0.f 0.f" instead of
"0.9e7" (or whatever, i haven't checked). it is not really important if
the the colour-representation in the saved patch is again some magic
word (though i would be far better (in terms of readability and
colour-depth) if the colours would be saved with something like
"#ff00ff" - using symbols to circumvent pd's rounding errors)
mfg.as.d
IOhannes
More information about the Pd-list
mailing list