-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Adding alpha functionality to bezier interpolation gka/chroma.j…
- Loading branch information
1 parent
0532186
commit 6656b99
Showing
6 changed files
with
437 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
177 changes: 177 additions & 0 deletions
177
packages/chroma-js/test/__snapshots__/bezier.spec.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,177 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`five color diverging quadratic bezier interpolation 1st quarter 1`] = ` | ||
Color { | ||
"_rgb": Array [ | ||
233.19030009653343, | ||
149.48568936490597, | ||
77.70818925383125, | ||
0.75, | ||
], | ||
} | ||
`; | ||
|
||
exports[`five color diverging quadratic bezier interpolation 3rd quarter 1`] = ` | ||
Color { | ||
"_rgb": Array [ | ||
165.95197295723432, | ||
206.80328083106684, | ||
193.23203906355687, | ||
0.25, | ||
], | ||
} | ||
`; | ||
|
||
exports[`five color diverging quadratic bezier interpolation center is snow 1`] = ` | ||
Color { | ||
"_rgb": Array [ | ||
254.9999889601456, | ||
250.0000173961273, | ||
249.99999732944465, | ||
0.5, | ||
], | ||
} | ||
`; | ||
|
||
exports[`five color diverging quadratic bezier interpolation ends in transparent royalblue 1`] = ` | ||
Color { | ||
"_rgb": Array [ | ||
65.00002095351515, | ||
104.99999975559058, | ||
225.00000209416496, | ||
0, | ||
], | ||
} | ||
`; | ||
|
||
exports[`five color diverging quadratic bezier interpolation starts from darkred 1`] = ` | ||
Color { | ||
"_rgb": Array [ | ||
138.9999882021398, | ||
0.00011212162605855155, | ||
0, | ||
1, | ||
], | ||
} | ||
`; | ||
|
||
exports[`four color cubic bezier interpolation 1st quarter 1`] = ` | ||
Color { | ||
"_rgb": Array [ | ||
255, | ||
224.03899248147033, | ||
132.81503252512528, | ||
0.65625, | ||
], | ||
} | ||
`; | ||
|
||
exports[`four color cubic bezier interpolation 3rd quarter 1`] = ` | ||
Color { | ||
"_rgb": Array [ | ||
144.87099553702365, | ||
65.651166141413, | ||
18.759023083692984, | ||
0.34375, | ||
], | ||
} | ||
`; | ||
|
||
exports[`four color cubic bezier interpolation center 1`] = ` | ||
Color { | ||
"_rgb": Array [ | ||
230.1559171578932, | ||
150.8554374112126, | ||
52.84422558429743, | ||
0.5, | ||
], | ||
} | ||
`; | ||
|
||
exports[`four color cubic bezier interpolation ends in transparent black 1`] = ` | ||
Color { | ||
"_rgb": Array [ | ||
2.0424926888958734e-7, | ||
2.042492495365618e-7, | ||
2.0424925616526716e-7, | ||
0, | ||
], | ||
} | ||
`; | ||
|
||
exports[`four color cubic bezier interpolation starts from white 1`] = ` | ||
Color { | ||
"_rgb": Array [ | ||
254.99998940693285, | ||
255, | ||
254.99999736707582, | ||
1, | ||
], | ||
} | ||
`; | ||
|
||
exports[`simple two color linear interpolation center is transluscent grey 1`] = ` | ||
Color { | ||
"_rgb": Array [ | ||
118.91328116479764, | ||
118.91329253054577, | ||
118.9132842032307, | ||
0.5, | ||
], | ||
} | ||
`; | ||
|
||
exports[`simple two color linear interpolation ends in transparent black 1`] = ` | ||
Color { | ||
"_rgb": Array [ | ||
2.0424926888958734e-7, | ||
2.042492495365618e-7, | ||
2.0424925616526716e-7, | ||
0, | ||
], | ||
} | ||
`; | ||
|
||
exports[`simple two color linear interpolation starts from white 1`] = ` | ||
Color { | ||
"_rgb": Array [ | ||
254.99998940693285, | ||
255, | ||
254.99999736707582, | ||
1, | ||
], | ||
} | ||
`; | ||
|
||
exports[`three color quadratic bezier interpolation center is a transluscent greyish red 1`] = ` | ||
Color { | ||
"_rgb": Array [ | ||
196.38575706795183, | ||
91.71313890151566, | ||
67.65992964943767, | ||
0.5, | ||
], | ||
} | ||
`; | ||
|
||
exports[`three color quadratic bezier interpolation ends in transparent black 1`] = ` | ||
Color { | ||
"_rgb": Array [ | ||
2.0424926888958734e-7, | ||
2.042492495365618e-7, | ||
2.0424925616526716e-7, | ||
0, | ||
], | ||
} | ||
`; | ||
|
||
exports[`three color quadratic bezier interpolation starts from white 1`] = ` | ||
Color { | ||
"_rgb": Array [ | ||
254.99998940693285, | ||
255, | ||
254.99999736707582, | ||
1, | ||
], | ||
} | ||
`; |
Oops, something went wrong.