You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I give an LCH color to the function, I get a different color in the output.
For example this is my color: lch(58.68% 98.6 352.06) (which is a valid P3 color)
I can at least comment and provide some insight. As things go the intermediary format internal to colord is RGBA. Even using the various other format methods everything passes through RGBA internally and won't maintain precision for anything beyond the sRGB color space. There are also rounding / precision aspects elsewhere in the code.
I really like the colord API and structure, but it does lack in precise control.
For precise control colorjs / https://colorjs.io/ is a fair candidate though the API and general structure is less than to be desired.
In an ideal world a solution that combines the API structure of colord w/ the data & format handling of colorjs would be ideal.
@saadeghi; Just for curiosities sake since you mentioned Svelte I am using a slightly modified version of colord (correct a precision aspect) for a high powered Svelte color picker component; (initial dev snapshot video). Also uses container queries and I implemented the fixes / support in Svelte 3.58.0 to make that so.
When I give an LCH color to the function, I get a different color in the output.
For example this is my color:
lch(58.68% 98.6 352.06)
(which is a valid P3 color)And using
toLchString
I expect the same values:But the result is:
Here's a live example: https://svelte.dev/repl/14e79bf716994c98956d6b27ae0065a5?version=3.58.0
The text was updated successfully, but these errors were encountered: