Skip to content

Commit 4f69cb6

Browse files
committed
Merge branch 'develop'
2 parents 1d572a6 + 9fd1f22 commit 4f69cb6

23 files changed

+6358
-272
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,14 @@ For more details, check [plugin community's page](https://www.figma.com/communit
1818
## Credits
1919
This plugin is made possible by the [Culori JS library](https://culorijs.org/) and the creator of these color models: [Björn Ottosson](https://bottosson.github.io/).
2020

21-
To know more about these uniform color spaces, you can check his original article: [Oksvh and Okhsl](https://bottosson.github.io/posts/colorpicker/) and the one from oklch.com's creators: [OKLCH in CSS: why we moved from RGB and HSL](https://evilmartians.com/chronicles/oklch-in-css-why-quit-rgb-hsl).
21+
The rendering of the color picker is done by [freydev](https://github.com/freydev) using WebGL shaders.
22+
23+
To know more about these uniform color spaces, you can check his original article: [Oksvh and Okhsl](https://bottosson.github.io/posts/colorpicker/) and the one from oklch.com's creators: [OKLCH in CSS: why we moved from RGB and HSL](https://evilmartians.com/chronicles/oklch-in-css-why-quit-rgb-hsl).
24+
25+
26+
# For developpers
27+
28+
## Why I don't use culori.mjs file from node_modules?
29+
Instead of importing from "../node_modules/culori/bundled/culori.mjs", I duplicated the file on the src folder due to clampChroma's limitation. The problem here is that this function can only clamp in sRGB, so to make it clamp in any provided space, I created "clampChromaInGamut(color, mode = "lch", targetGamut = "rgb")". I will send the suggestion to CuloriJS's author to add it in its code.
30+
31+
I tried to use toGamut() but it changes the hue and luminosity of the final color, and what I needed, was to only clamp the chroma while keeping the two others values untouched.

dist/plugin/code.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ui/index.html

Lines changed: 588 additions & 5 deletions
Large diffs are not rendered by default.

package-lock.json

Lines changed: 69 additions & 47 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)