Files
cinny/src/app/utils/discordNameplatePalettes.ts
litruv 0cbc5d9a1c
All checks were successful
Trigger cinny-mobile / dispatch (push) Successful in 1s
Add Discord collectibles to profiles, messages, and settings.
Integrate profile effects, nameplates, and avatar decorations with live catalog browsing, Matrix profile storage, and rendering across user heroes, DMs, messages, and the sidebar avatar.
2026-08-24 00:54:48 +10:00

29 lines
1.2 KiB
TypeScript

/** Discord nameplate palette IDs from the API — mapped to representative gradient colors. */
const NAMEPLATE_PALETTE_GRADIENTS: Record<string, string> = {
crimson: 'linear-gradient(135deg, #5c0a1c, #dc143c)',
berry: 'linear-gradient(135deg, #4a1030, #c42d78)',
sky: 'linear-gradient(135deg, #0a2a5c, #3b8eed)',
teal: 'linear-gradient(135deg, #0a3d3d, #2dd4bf)',
forest: 'linear-gradient(135deg, #0a2e1a, #22c55e)',
bubble_gum: 'linear-gradient(135deg, #4a1038, #f472b6)',
violet: 'linear-gradient(135deg, #2d1050, #8b5cf6)',
cobalt: 'linear-gradient(135deg, #0a1448, #3b5bdb)',
clover: 'linear-gradient(135deg, #0a3d20, #4ade80)',
lemon: 'linear-gradient(135deg, #4a3d0a, #fbbf24)',
white: 'linear-gradient(135deg, #888888, #f0f0f0)',
black: 'linear-gradient(135deg, #1a1a1a, #404040)',
};
export function nameplatePaletteGradient(palette?: string): string | undefined {
if (!palette) return undefined;
return NAMEPLATE_PALETTE_GRADIENTS[palette];
}
export function formatNameplatePalette(palette?: string): string | undefined {
if (!palette) return undefined;
return palette
.split('_')
.map((part) => part.charAt(0).toUpperCase() + part.slice(1))
.join(' ');
}