-
-
Notifications
You must be signed in to change notification settings - Fork 94
-
I need a Kelvin slider from range 2000-9000.
var temperature = new iro.ColorPicker('#temperature', {
layout: [
{
component: iro.ui.Slider,
options: {
sliderType: 'kelvin',
minTemperature : 2000,
maxTemperature : 9000,
layoutDirection: 'horizontal'
}
},
]
});
On event 'input:end' I print to console using:
temperature.on('input:end', function(color) {
console.log(color.kelvin);
});
The min and max values I got back were:
2000.2899169921875
8986.129760742188
Am I using the kelvin slider correctly?
Beta Was this translation helpful? Give feedback.
All reactions
Answered by
jaames
Jul 16, 2021
yes, the conversion between kelvin <-> rgb is just a rough approximation, so it's not extremely accurate and can sometimes give weird values
Replies: 1 comment
-
yes, the conversion between kelvin <-> rgb is just a rough approximation, so it's not extremely accurate and can sometimes give weird values
Beta Was this translation helpful? Give feedback.
All reactions
0 replies
Answer selected by
jaames
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment