function ramp_xyz(xyz) {
const height = 66;
const context = DOM.context2d(width, height, 1);
context.canvas.style.imageRendering = "pixelated";
for (let x = 0; x < width; ++x) {
const rgb = xyz_rgb(xyz(x / width));
const c = clamp_lc(culori.lch({ mode:'rgb', r: rgb[0], g: rgb[1], b: rgb[2] }));
context.fillStyle = culori.formatRgb(c);
context.fillRect(x, 0, 1, height);
}
return context.canvas;
}