[PD] hex color values
Krzysztof Czaja
czaja at chopin.edu.pl
Sun Oct 17 12:23:12 CEST 2004
hi G_ M,
"winfo rgb ." is Tk's color name to rgb converter (for the root
window's colormap). Since it fails if given an empty string, it
should either be wrapped in a catch clause, or in a test, like this:
query set cl [tk_chooseColor] .: if .($cl != "".) .(winfo rgb . $cl.)
The tot's output is then a list of three 16-bit intensities, so they
would probably need to be unpacked, and quantized with / 256 -> int.
Krzysztof
G_ M wrote:
...
> But as you can see in the example patch (attached) I need to convert the
> hex color values to RGB values. Now I was wondering if there is any
...
> #X msg 21 43 query tk_chooseColor;
More information about the Pd-list
mailing list