Skip to content

Commit 74e8505

Browse files
committed
Merge branch 'develop'
2 parents 4f69cb6 + bd2255d commit 74e8505

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+10630
-10282
lines changed

.eslintrc.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es2021": true
5+
},
6+
"extends": [
7+
"eslint:recommended",
8+
"plugin:react/recommended",
9+
"plugin:@typescript-eslint/recommended"
10+
],
11+
"parser": "@typescript-eslint/parser",
12+
"parserOptions": {
13+
"ecmaVersion": "latest",
14+
"sourceType": "module"
15+
},
16+
"plugins": ["react", "@typescript-eslint"],
17+
"rules": {
18+
"react/react-in-jsx-scope": "off",
19+
"@typescript-eslint/no-explicit-any": "off"
20+
},
21+
"settings": {
22+
"react": {
23+
"version": "detect"
24+
}
25+
}
26+
}

.prettierrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"tabWidth": 2,
3+
"useTabs": false,
4+
"semi": false,
5+
"quoteProps": "consistent",
6+
"singleQuote": true,
7+
"trailingComma": "none",
8+
"printWidth": 150
9+
}

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
![Easier color palettes and accessibility](readme-banner.webp)
22

33
# OkColor
4+
45
This is a plugin for Figma, [see its community page](https://www.figma.com/community/plugin/1173638098109123591/OkColor).
56

67
@@ -16,16 +17,17 @@ The plugin is also reactive to color changes made in Figma and vice versa, you c
1617
For more details, check [plugin community's page](https://www.figma.com/community/plugin/1173638098109123591/OkColor) for a FAQ and a playground file that explain in more details the plugin.
1718

1819
## Credits
20+
1921
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/).
2022

2123
The rendering of the color picker is done by [freydev](https://github.com/freydev) using WebGL shaders.
2224

2325
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).
2426

25-
2627
# For developpers
2728

2829
## Why I don't use culori.mjs file from node_modules?
30+
2931
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.
3032

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.
33+
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: 65 additions & 23 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)