All checks were successful
Trigger cinny-mobile / dispatch (push) Successful in 1s
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.
29 lines
1.2 KiB
TypeScript
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(' ');
|
|
}
|