let original= new Color("color(rec2020 0 0 1)");
let mapped = original.to("srgb");
mapped.toGamut({method:"clip"});
let lchresult = mapped.toGamut({method:"lch.chroma"});
lchresult.to("oklch");
let okresult = mapped.toGamut({method:"oklch.chroma"});
let colorALAB = new Color('lab(50%, -127, -127)');
let colorAOKLCH = colorALAB.to('oklch');
let colorA = new Color('oklch(42.2% 1.95 191)');
let colorB = colorA.toGamut({method: 'oklch.c', space: 'srgb'});
let white = new Color("white");
let black =new Color("black");
let gray18 =new Color("color(srgb-linear 0.18 0.18 0.18)");
white.contrast(black, "WCAG21");
We're thinking that, like, an #eee or an #eef rather than a pure #fff, very short distance. We know for a fact that very often people reach for slightly off-white and off-black. That's from color design bible. Do #111 or #eee. That suggests we should be slightly off white/black for this. but it doesn't tell us exact value
let color1 = new Color("#111");
let color2 = new Color("black");
let color3 = new Color("#eee");
let color4 = new Color("white");