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

View File

@ -107,7 +107,7 @@
{:else if name && displayName && displayName !== ''} {:else if name && displayName && displayName !== ''}
<div <div
class="ava-text" 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()} data-name={displayName.toLocaleUpperCase()}
/> />
{:else} {:else}