Returns a rough estimation of a color's temperature as either 'cool' or 'warm' using the 'lch' colorspace.
'cool'
'warm'
'lch'
The color to check the temperature.
import { temp } from '@skchr/color'let sample = [ "#00ffdc", "#00ff78", "#00c000"];console.log(temp(sample[2]));// 'cool'console.log(map(sample, temp));// [ 'cool', 'warm', 'cool'] Copy
import { temp } from '@skchr/color'let sample = [ "#00ffdc", "#00ff78", "#00c000"];console.log(temp(sample[2]));// 'cool'console.log(map(sample, temp));// [ 'cool', 'warm', 'cool']
Returns a rough estimation of a color's temperature as either
'cool'or'warm'using the'lch'colorspace.