|
|
@ -30,13 +30,19 @@ export function IconBlock({icon, color}: IconProps) { |
|
|
|
s.backgroundImage = "linear-gradient(to bottom right, red, yellow, green, blue, violet)"; |
|
|
|
} else if (color === "k-gradient") { |
|
|
|
s.backgroundImage = "linear-gradient(to bottom right, #ff9329, #ffd6aa, #fffaf4, #fff, #c9e2ff, #40a3ff)"; |
|
|
|
} else if (color.kelvin !== undefined && color.kelvin > 0) { |
|
|
|
s.color = kelvinToRgbHex(color.kelvin); |
|
|
|
} else { |
|
|
|
const hue = color.h || 0; |
|
|
|
} else if (color.h !== undefined) { |
|
|
|
const hue = color.h; |
|
|
|
const sat = Math.floor((color.s || 0) * 100); |
|
|
|
|
|
|
|
s.color = `hsl(${hue}, ${sat}%, 50%)`; |
|
|
|
|
|
|
|
if (color.kelvin) { |
|
|
|
s.borderBottom = `1px solid ${kelvinToRgbHex(color.kelvin)}`; |
|
|
|
} |
|
|
|
} else if (color.kelvin !== undefined && color.kelvin > 0) { |
|
|
|
s.color = kelvinToRgbHex(color.kelvin); |
|
|
|
} else { |
|
|
|
s.color = "white" |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|