ControlP5 ColorPicker -- Get Alpha Value from ColorPicker? label style: Move checkbox labels?
in
Contributed Library Questions
•
2 years ago
ControlP5's ColorPicker has four sliders, three for red, green, and blue, and the fourth is for alpha. The function getColorValue() returns values in the format: -1 = 255 r,g,b,a; 1684300900 where r,g,b, & a are 100; 0 where all values are zero. I just want to get the alpha value in a form I can use in processing. Alternatively, I could control the alpha with a normal controlP5 slider if there's some way to just show the three color selector bars and not the alpha selector bar.
My second question is that by default -- e.g. controlP5.addToggle("scrolling",true,10,20,10,10).setGroup(l); -- labels appear below checkboxes, as in:
[ ]
scrolling
I'd like to put the label above the checkbox, as in:
scrolling
[ ]
Ideally, I would like to refer to the value 'scrolling' but, want to display the text, "Scroll Title Text" instead of 'scrolling'.
Do I need to hide the checkbox label and draw a text label, or is there a better way to do this by modifying the checkbox control or using extended styles?
My second question is that by default -- e.g. controlP5.addToggle("scrolling",true,10,20,10,10).setGroup(l); -- labels appear below checkboxes, as in:
[ ]
scrolling
I'd like to put the label above the checkbox, as in:
scrolling
[ ]
Ideally, I would like to refer to the value 'scrolling' but, want to display the text, "Scroll Title Text" instead of 'scrolling'.
Do I need to hide the checkbox label and draw a text label, or is there a better way to do this by modifying the checkbox control or using extended styles?
1