diff options
author | crupest <crupest@outlook.com> | 2021-06-16 20:33:31 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-06-16 20:33:31 +0800 |
commit | f3e53af1f7e6a78a302a2a5f88ab3e898e92eac6 (patch) | |
tree | bdc631abac08fdb98223198715bb0c2cf164558c /FrontEnd/src/palette.ts | |
parent | 6328d3eddd50f467921f8eb029937523be203b74 (diff) | |
download | timeline-f3e53af1f7e6a78a302a2a5f88ab3e898e92eac6.tar.gz timeline-f3e53af1f7e6a78a302a2a5f88ab3e898e92eac6.tar.bz2 timeline-f3e53af1f7e6a78a302a2a5f88ab3e898e92eac6.zip |
fix: Real fix #624.
Diffstat (limited to 'FrontEnd/src/palette.ts')
-rw-r--r-- | FrontEnd/src/palette.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/FrontEnd/src/palette.ts b/FrontEnd/src/palette.ts index da1e133f..ab3d6b54 100644 --- a/FrontEnd/src/palette.ts +++ b/FrontEnd/src/palette.ts @@ -1,6 +1,8 @@ import Color from "color"; import { BehaviorSubject, Observable } from "rxjs"; +import refreshAnimation from "./utilities/refreshAnimation"; + function lightenBy(color: Color, ratio: number): Color { const lightness = color.lightness(); return color.lightness(lightness + (100 - lightness) * ratio); @@ -83,7 +85,7 @@ export function generatePaletteCSS(palette: Palette): string { } } - return `html {${colors + return `:root {${colors .map(([key, color]) => `${key} : ${color};`) .join("")}}`; } @@ -110,6 +112,8 @@ palette$.subscribe((palette) => { styleTag.parentElement?.removeChild(styleTag); } } + + refreshAnimation(); }); export function setPalette(palette: Palette): () => void { |