64 lines
1.7 KiB
TypeScript
64 lines
1.7 KiB
TypeScript
import { LocaleType } from "@/content/locales";
|
|
|
|
export const getPlanetTheme = (
|
|
terrain: string = "",
|
|
climate: string = "",
|
|
t: LocaleType,
|
|
) => {
|
|
const terr = terrain.toLowerCase();
|
|
const clim = climate.toLowerCase();
|
|
|
|
if (terr.includes("ocean") || terr.includes("water"))
|
|
return {
|
|
color: "text-blue-400",
|
|
border: "border-blue-500",
|
|
glow: "shadow-[0_0_20px_#3b82f6]",
|
|
label: t.ACTION_PANEL.MODES.AQUATIC,
|
|
hex: "#60a5fa",
|
|
};
|
|
if (terr.includes("forest") || terr.includes("jungle"))
|
|
return {
|
|
color: "text-green-400",
|
|
border: "border-green-500",
|
|
glow: "shadow-[0_0_20px_#22c55e]",
|
|
label: t.ACTION_PANEL.MODES.VERDANT,
|
|
hex: "#4ade80",
|
|
};
|
|
if (terr.includes("desert") || clim.includes("arid"))
|
|
return {
|
|
color: "text-orange-400",
|
|
border: "border-orange-500",
|
|
glow: "shadow-[0_0_20px_#f97316]",
|
|
label: t.ACTION_PANEL.MODES.ARID,
|
|
hex: "#fb923c",
|
|
};
|
|
if (
|
|
terr.includes("ice") ||
|
|
terr.includes("glacier") ||
|
|
clim.includes("frozen")
|
|
)
|
|
return {
|
|
color: "text-cyan-200",
|
|
border: "border-cyan-300",
|
|
glow: "shadow-[0_0_20px_#a5f3fc]",
|
|
label: t.ACTION_PANEL.MODES.CRYO,
|
|
hex: "#22d3ee",
|
|
};
|
|
if (terr.includes("city") || terr.includes("urban"))
|
|
return {
|
|
color: "text-purple-400",
|
|
border: "border-purple-500",
|
|
glow: "shadow-[0_0_20px_#a855f7]",
|
|
label: t.ACTION_PANEL.MODES.ECUMENOPOLIS,
|
|
hex: "#c084fc",
|
|
};
|
|
|
|
return {
|
|
color: "text-yellow-500",
|
|
border: "border-yellow-500",
|
|
glow: "shadow-[0_0_20px_#eab308]",
|
|
label: t.ACTION_PANEL.MODES.STANDARD,
|
|
hex: "#eab308",
|
|
};
|
|
};
|