feat(catalog): color equipment by rarity
CI / Verify (push) Successful in 1m0s
CI / Build immutable images and deploy (push) Successful in 3m26s

This commit is contained in:
2026-08-30 06:09:19 +00:00 Unverified
parent 890fb9385a
commit d0e2a95350
10 changed files with 3544 additions and 20 deletions
+23
View File
@@ -0,0 +1,23 @@
const rarityGradientClasses: Record<number, string> = {
1: "bg-[linear-gradient(90deg,rgba(23,25,28,1)_0%,rgba(19,20,23,1)_100%)]",
2: "bg-[linear-gradient(90deg,rgba(11,43,24,1)_0%,rgba(7,18,13,1)_100%)]",
3: "bg-[linear-gradient(90deg,rgba(0,160,181,1)_0%,rgba(0,0,0,1)_100%)]",
4: "bg-gradient-to-r from-[#a300b8] to-black",
5: "bg-[linear-gradient(90deg,rgba(138,90,0,1)_0%,rgba(15,8,0,1)_100%)]",
};
const rarityGradients: Record<number, string> = {
1: "linear-gradient(90deg, rgba(23, 25, 28, 1) 0%, rgba(19, 20, 23, 1) 100%)",
2: "linear-gradient(90deg, rgba(11, 43, 24, 1) 0%, rgba(7, 18, 13, 1) 100%)",
3: "linear-gradient(90deg, rgba(0, 160, 181, 1) 0%, rgba(0, 0, 0, 1) 100%)",
4: "linear-gradient(90deg, rgba(163, 0, 184, 1) 0%, rgba(0, 0, 0, 1) 100%)",
5: "linear-gradient(90deg, rgba(138, 90, 0, 1) 0%, rgba(15, 8, 0, 1) 100%)",
};
export function rarityGradientClass(rarity: number | null | undefined): string | undefined {
return rarity ? rarityGradientClasses[rarity] : undefined;
}
export function rarityGradient(rarity: number | null | undefined): string {
return (rarity && rarityGradients[rarity]) || "#17383d";
}