[PD] ds colors to iem colors

João Pais jmmmpais at googlemail.com
Sat Sep 11 13:15:11 CEST 2010


This isn't a converter, but it displays Pd's ds colors. It's been in svn  
for a while, but am not sure now if it packs with pd-ext yet.

João

> On Fri, 10 Sep 2010, Jonathan Wilkes wrote:
>
>> Does anyone have an object chain to convert from the three-digit
>> ds colors to iemgui colors?  I tried creating one here, but they are
>> visibly off.  Am I doing something wrong?
>
> You can find that in pd/src/g_template.c. It's because, for some unknown
> reason, there are not 1000 possible colours, only 729 of them, because  
> the
> digit "9" is not in use, so, you have to do [/ 8] instead of [/ 9], and
> that is something that goes after a [min 8].
>
> And note that instead of [/ 8] [* 255], to get exactly the same values as
> Miller, you'd do [* 32] [min 255], but that's not very visible in
> comparison to the first change.
>
> As a shorthand, you can also do it all with :
>
>   |
> [#outer / (100 10 1)]
>   |
> [# % 10]
>   |
> [# min 8]
>   |
> [# << 5]
>   |
> [# min 255]
>   |
> [#to_iem]
>   |
>
>   _______________________________________________________________________
> | Mathieu Bouchard ------------------------------ Villeray, Montréal, QC


-- 
Friedenstr. 58
10249 Berlin (Deutschland)
Tel +49 30 42020091 | Mob +49 162 6843570
Studio +49 30 69509190
jmmmpais at googlemail.com | skype: jmmmpjmmmp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pd-colors.pd
Type: application/puredata
Size: 42459 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20100911/03e26838/attachment-0001.bin>


More information about the Pd-list mailing list