Lots of frontend changes
This commit is contained in:
parent
ec29631c44
commit
555ba7cf53
38 changed files with 1508 additions and 648 deletions
7
frontend/src/lib/utils.ts
Normal file
7
frontend/src/lib/utils.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
/**
|
||||
* Converts a gradient definition to CSS linear-gradient string
|
||||
*/
|
||||
export function gradientToCss(gradient: { t: number; color: [number, number, number] }[]): string {
|
||||
const stops = gradient.map(({ t, color }) => `rgb(${color.join(',')}) ${t * 100}%`).join(', ');
|
||||
return `linear-gradient(in oklch to right, ${stops})`;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue