Most appropriate sub-area of p5.js?
p5.js version
2.2.3
Web browser and version
Browser-independent (tested on Safari 26.4, Chromium 148.0.7778.167)
Operating system
macOS
Steps to reproduce this
Steps:
For example:
- Define a color using
oklch: color("oklch(0.8, 0.1, 230)")
- Define another color in sRGB:
color(0)
- Attempt to interpolate them:
lerpColor(c_0, c_1, 0.5)
Result
Uncaught exception from color.js: TypeError: No color space found with id = "xyz-d65"
Snippet:
Also see: https://editor.p5js.org/dontwanttothink/sketches/pzp5YlR8t
function setup() {
createCanvas(400, 400);
}
function draw() {
const c_0 = color("oklch(0.8 0.1 230)");
const c_1 = color(0);
printColorSpacePath(c_0);
printColorSpacePath(c_1);
background(lerpColor(c_0, c_1, 0.5));
}
function printColorSpacePath(c) {
console.log(c._color.space.path.map(space => space.id))
}
Most appropriate sub-area of p5.js?
p5.js version
2.2.3
Web browser and version
Browser-independent (tested on Safari 26.4, Chromium 148.0.7778.167)
Operating system
macOS
Steps to reproduce this
Steps:
For example:
oklch:color("oklch(0.8, 0.1, 230)")color(0)lerpColor(c_0, c_1, 0.5)Result
Uncaught exception from
color.js:TypeError: No color space found with id = "xyz-d65"Snippet:
Also see: https://editor.p5js.org/dontwanttothink/sketches/pzp5YlR8t