Skip to content

Instantly share code, notes, and snippets.

View svgeesus's full-sized avatar

Chris Lilley svgeesus

View GitHub Profile

Gamut mapping

default vs manual adjustment

let color = new Color("p3", [0, 1, 1]);
color.chroma;
let m = "2000";
let color2 = color.to("srgb");
let color3 = color2.toGamut();

Title

let P3_yellow = new Color("p3", [1, 1, 0]);
let P3_LCH = P3_yellow.lch;
let sRGB_yellow = P3_yellow.to("srgb");
sRGB_yellow.toGamut();
sRGB_yellow.toGamut({method: "clip"});
sRGB_yellow.toGamut({method: "jzczhz.chroma"});
@svgeesus
svgeesus / dabblet.css
Created October 13, 2018 16:39
use with eyes
/**
* use with eyes
*/
.robot {
fill: none;
stroke: red;
@svgeesus
svgeesus / dabblet.css
Created September 8, 2016 22:05 — forked from anonymous/dabblet.css
Test inherited value of currentColor is the keyword currentColor
/* Test inherited value of currentColor is the keyword currentColor
"This happens at used-value time, which means that if the value is inherited, it’s
inherited as currentcolor, not as the value of the color property, so descendants
will use their own color property to resolve it."
*/
.outer {color: red;
background-color: currentColor;
font-size: 200%;