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