Skip to content

Commit

Permalink
Allow angle values for HCT Hue coordinate (#418)
Browse files Browse the repository at this point in the history
  • Loading branch information
lloydk authored Feb 10, 2024
1 parent 9db5f3d commit 2f264bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/spaces/hct.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ export default new ColorSpace({
},
formats: {
color: {
id: "--hct"
id: "--hct",
coords: ["<number> | <angle>", "<percentage> | <number>", "<percentage> | <number>"]
},
},
});
4 changes: 4 additions & 0 deletions tests/parse.html
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,10 @@ <h1>color()</h1>
<td>color(--jzazbz 0 25% -50%)</td>
<td>{"spaceId":"jzazbz","coords":[0,0.125,-0.25],"alpha":1}</td>
</tr>
<tr>
<td>color(--hct 0.25turn 50% 25)</td>
<td>{"spaceId":"hct","coords":[90,72.5,25],"alpha":1}</td>
</tr>
<tr title="With transparency">
<td>color(display-p3 0 1 0 / .5)</td>
<td>{"spaceId":"p3","coords":[0,1,0],"alpha":0.5}</td>
Expand Down

0 comments on commit 2f264bf

Please sign in to comment.