-
-
Notifications
You must be signed in to change notification settings - Fork 94
-
How do I set the initial value for a value slider?
var brightnessPicker = new iro.ColorPicker('#brightness', {
layout: [
{
component: iro.ui.Slider,
options: {
// can also be 'saturation', 'value', 'red', 'green', 'blue', 'alpha' or 'kelvin'
sliderType: 'value'
}
},
]
});
Beta Was this translation helpful? Give feedback.
All reactions
Answered by
jaames
Jul 15, 2021
it takes its value from the color's value; the "V" in "HSV". You need to provide an initial color to set that
var brightnessPicker = new iro.ColorPicker('#brightness', { color: { h: 0, s: 0, v: 50 // initial value }, layout: [ { component: iro.ui.Slider, options: { // can also be 'saturation', 'value', 'red', 'green', 'blue', 'alpha' or 'kelvin' sliderType: 'value' } }, ] });
Replies: 1 comment
-
it takes its value from the color's value; the "V" in "HSV". You need to provide an initial color to set that
var brightnessPicker = new iro.ColorPicker('#brightness', { color: { h: 0, s: 0, v: 50 // initial value }, layout: [ { component: iro.ui.Slider, options: { // can also be 'saturation', 'value', 'red', 'green', 'blue', 'alpha' or 'kelvin' sliderType: 'value' } }, ] });
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
0 replies
Answer selected by
jaames
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment