diff --git a/src/icons.ts b/src/icons.ts index 75a78ea..a225339 100644 --- a/src/icons.ts +++ b/src/icons.ts @@ -1,8 +1,11 @@ import { RANK } from "./utils.ts"; const goldColor = "#FAD200"; +const goldTextColor = "#886000"; const silverColor = "#B0B0B0"; +const silverTextColor = "#505050"; const bronzeColor = "#816D46"; +const bronzeTextColor = "#614D26"; const leafIcon = ` @@ -47,26 +50,30 @@ function getSmallTrophyIcon(icon: string, color: string, count: number): string } export function getTrophyIcon(rank = RANK.UNKNOWN) { + + let color = "currentColor"; + let rankColor = "#333"; + let backgroundIcon = ""; + if (rank.slice(0, 1) === RANK.S) { + color = goldColor; + rankColor = goldTextColor; + backgroundIcon = leafIcon; + } else if (rank.slice(0, 1) === RANK.A) { + color = silverColor; + rankColor = silverTextColor; + backgroundIcon = leafIcon; + } else if (rank === RANK.B) { + color = bronzeColor; + rankColor = bronzeTextColor; + } const icon = ` - ${rank.slice(0, 1)} + ${rank.slice(0, 1)} `; - - let color = "currentColor"; - let backgroundIcon = ""; - if (rank.slice(0, 1) === RANK.S) { - color = goldColor; - backgroundIcon = leafIcon; - } else if (rank.slice(0, 1) === RANK.A) { - color = silverColor; - backgroundIcon = leafIcon; - } else if (rank === RANK.B) { - color = bronzeColor; - } const optionRankIcon = getSmallTrophyIcon(icon, color, rank.length - 1); return ` ${backgroundIcon}