melatonin_inspector icon indicating copy to clipboard operation
melatonin_inspector copied to clipboard

Implement custom color picker (from PlugData)

Open sudara opened this issue 2 years ago • 5 comments

Timothy from PlugData has graciously offered we steal their custom color picker so we can move away from JUCE's default one.

https://github.com/plugdata-team/plugdata/blob/main/Source/Utility/ColourPicker.h

sudara avatar Aug 16 '23 19:08 sudara

We have a more fully featured one here:

https://github.com/reFX/ColourSelector

It's the same functionality as Photoshop. The means the color-space square changes according to the mode, etc.

We could work together to make it prettier. It's based on the JUCE one, but then added features:

image

reFX-Mike avatar Aug 17 '23 18:08 reFX-Mike

Hey nice work!

For the inspector I'd like to:

  • Be able to pass in a hex/rgba preference for output value. Many of us working in vector/web are often more used to working with r,g,b,a values instead of hex
  • Have an alpha slider
  • Hide the "picked color" (the selector is pointing to it and it's visible in context)
  • Hide all the HSB/RGB values and sliders

So basically, I'd like to end up with similar to the PlugData version here (though the toggle isn't necessary since there's a toggle in the inspector already).

sudara avatar Aug 17 '23 20:08 sudara

Except for the output as RGB values instead of hex, this is all supported. It uses the usual "flags" in the constructor and you can turn everything on/off invidivually.

reFX-Mike avatar Aug 17 '23 20:08 reFX-Mike

Nice!

For the inspector, I've also been thinking that the color picker should enable when the selector pops open (like every other app's color selector) and allow for repeated picking...

sudara avatar Aug 17 '23 20:08 sudara

100% agree

reFX-Mike avatar Aug 17 '23 20:08 reFX-Mike