Allow passing a chroma color as a start/mid/end color

This commit is contained in:
Nate Butler
2023-02-11 21:10:47 -05:00
parent 0acb820f04
commit 187fac1579
3 changed files with 11 additions and 6 deletions
+3 -3
View File
@@ -38,9 +38,9 @@ export function generateColors(props: ColorProps, inverted: boolean) {
const { start, middle, end } = props.color;
const startColor = validColor(start);
const middleColor = validColor(middle);
const endColor = validColor(end);
const startColor = typeof start === "string" ? validColor(start) : start;
const middleColor = typeof middle === "string" ? validColor(middle) : middle;
const endColor = typeof end === "string" ? validColor(end) : end;
// TODO: Use curve when generating colors