Color picker as an input fonction

I don't want to hack the .xml so can you add color in the input menu...



How do you want to use this value in vanilla Snap! ? There are no blocks accepting JS color object returned by such input. You can get RGBA string with "join" but it can be used only to directly set costume pixels or recreate HSB from RGB.

Even bh "Colors and Crayons" library uses this approach...

We could do what the library does: the color could be represented as a one-pixel costume.



I can do this but it's not a real picker...

Yeah, I agree that colors should be just as usable as any other data type. But, given that we have a workaround, that's probably around #387 on the list. :~/

hahaha, thank you !

You can modify the xml by changing the input type to %clr

Didn't he already say he didn't want to modify the .xml?

Yes, i know, but thats how to do it modifying the xml.

Easiest way - add input type "Color".

i like it

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.