diff options
| author | KevinWh0 <45321184+KevinWh0@users.noreply.github.com> | 2024-05-06 13:59:42 +0200 |
|---|---|---|
| committer | KevinWh0 <45321184+KevinWh0@users.noreply.github.com> | 2024-05-06 13:59:42 +0200 |
| commit | a058c855fc27c17d84dfb1655191cabdcf844c7a (patch) | |
| tree | 48a892356330bb5aa5a15c8b0f00332bc48b57fc /packages/frontend/src/scripts | |
| parent | fixing a buch of comments (diff) | |
| download | sharkey-a058c855fc27c17d84dfb1655191cabdcf844c7a.tar.gz sharkey-a058c855fc27c17d84dfb1655191cabdcf844c7a.tar.bz2 sharkey-a058c855fc27c17d84dfb1655191cabdcf844c7a.zip | |
changed grabbing theme color for dot to match the other things in this project
Diffstat (limited to 'packages/frontend/src/scripts')
| -rw-r--r-- | packages/frontend/src/scripts/favicon-dot.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/frontend/src/scripts/favicon-dot.ts b/packages/frontend/src/scripts/favicon-dot.ts index 643ee1b76b..e338f55f72 100644 --- a/packages/frontend/src/scripts/favicon-dot.ts +++ b/packages/frontend/src/scripts/favicon-dot.ts @@ -1,3 +1,5 @@ +import tinycolor from 'tinycolor2'; + class FavIconDot { canvas: HTMLCanvasElement; src: string | null = null; @@ -70,7 +72,8 @@ class FavIconDot { if (!this.ctx || !this.faviconImage) return; this.ctx.beginPath(); this.ctx.arc(this.faviconImage.width - 10, 10, 10, 0, 2 * Math.PI); - this.ctx.fillStyle = getComputedStyle(document.documentElement).getPropertyValue('--navIndicator'); + const computedStyle = getComputedStyle(document.documentElement); + this.ctx.fillStyle = tinycolor(computedStyle.getPropertyValue('--navIndicator')).toHexString(); this.ctx.strokeStyle = 'white'; this.ctx.fill(); this.ctx.stroke(); |