mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 12:09:26 +00:00
Only use hex when color is within sRGB
This commit is contained in:
@@ -41,9 +41,9 @@ for (let paletteId in palettes) {
|
||||
|
||||
let color = tints[tint];
|
||||
tint = tint.padStart(2, '0');
|
||||
let format = color.inGamut('srgb') ? 'hex' : undefined;
|
||||
|
||||
tintCSS =
|
||||
`--wa-color-${hue}-${tint}: ${color.toString({ format: 'hex' })} /* ${color.toString()} */;\n` + tintCSS;
|
||||
tintCSS = `--wa-color-${hue}-${tint}: ${color.toString({ format })} /* ${color.toString()} */;\n` + tintCSS;
|
||||
}
|
||||
|
||||
if (tints.maxChromaTint != tints.maxChromaTintRaw) {
|
||||
|
||||
Reference in New Issue
Block a user