Corrected colors in headers (ListView) (#3728)

Signed-off-by: Alexander Platov <sas_lord@mail.ru>
This commit is contained in:
Alexander Platov 2023-09-21 19:24:45 +03:00 committed by GitHub
parent c7bb5b9cab
commit 65c511ef77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -13,6 +13,7 @@ export interface ColorDefinition {
name: string
color: string
icon?: string
iconText?: string
title?: string
number?: string
background?: string
@ -50,13 +51,14 @@ const defineAvatarColor = (
dark: boolean = false
): ColorDefinition => {
const background = rgbToHex(hslToRgb(h / 360, s / 100, l / 100))
const icon: string | undefined = rgbToHex(hslToRgb(h / 360, 0.5, 0.6))
const title: string | undefined = rgbToHex(hslToRgb(h / 360, 0.9, 0.9))
const icon = rgbToHex(hslToRgb(h / 360, 0.5, 0.6))
const iconText = rgbToHex(hslToRgb(h / 360, 0.9, 0.9))
return {
name,
color: background,
icon,
title,
iconText,
title: undefined,
number: undefined,
background:
gradient.length === 1

View File

@ -107,7 +107,7 @@
{:else if name && displayName && displayName !== ''}
<div
class="ava-text"
style:color={color ? color.title : 'var(--accented-button-color)'}
style:color={color ? color.iconText : 'var(--accented-button-color)'}
data-name={displayName.toLocaleUpperCase()}
/>
{:else}