[PD] Pd's RGB color scheme for Data Structures

Ingo Stock mail at ingostock.de
Fri Mar 2 18:08:51 CET 2018


On 03/02/2018 05:54 PM, José de Abreu wrote:> but for 0 to 255 rgb
values, the math is simple, just divide this number
> by 9/255 and discard the fractional part, then multiply by the position
> and sum all (it gives a number from 0 to 999)

With data structures, the color range for red, green, blue is from 0 to
8 respectively, so the whole spectrum is 0-888. A digit 9 equals digit 8
so 959 equals 858. So the calculation is * 8/255.

See here for a demo patch:
https://forum.pdpatchrepo.info/topic/11085/how-to-convert-pd-s-color-numbers-for-data-structures-to-rgb

best, ingo

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20180302/333d90f4/attachment.sig>


More information about the Pd-list mailing list