I found your project while I was considering whether I should access the canvas directly because p5.js didn't support color space including oklch. To see if it supports wide gamut, I tried to compare the color of p3 color gamut with its fallback through the code below.
However, the error phrase below appeared on the console.
TypeError: Cannot read properties of undefined (reading '_q5Color')
at $.fill (q5.js:642:11)
at setup (sketch.js:10:3)
at Q5.$.<computed> [as setup] (q5.js:209:17)
at _start (q5.js:226:11)
at new Q5 (q5.js:236:3)
at HTMLDocument.<anonymous> (q5.js:270:23)
I think the fill function cannot accepts color data created through colorMode('oklch') as a variable, do I have to use a different method when using colorMode('oklch') or is it a feature that hasn't been implemented yet, or is it a bug?
By the way, #ff0c52 appeared pinkish red but little bit saturated as intended, and oklch color was rendered...... gray.
Ah wow thanks for reporting this, not sure how it got messed up. Seems like changes I made to support oklch got reverted or didn't merge somewhere along the line. Just fixed this!
I found your project while I was considering whether I should access the canvas directly because p5.js didn't support color space including oklch. To see if it supports wide gamut, I tried to compare the color of p3 color gamut with its fallback through the code below.
However, the error phrase below appeared on the console.
I think the fill function cannot accepts color data created through colorMode('oklch') as a variable, do I have to use a different method when using colorMode('oklch') or is it a feature that hasn't been implemented yet, or is it a bug? By the way, #ff0c52 appeared pinkish red but little bit saturated as intended, and oklch color was rendered...... gray.