updates
All checks were successful
Build and Deploy / Build & Push Image (push) Successful in 32s

This commit is contained in:
2026-03-25 21:57:06 -06:00
parent d3016d6639
commit 94ccfa7b90
2 changed files with 25 additions and 1 deletions

View File

@@ -224,6 +224,30 @@ defmodule CobblemonUi.TypeChart do
def type_color("fairy"), do: "bg-[#D685AD]"
def type_color(_), do: "bg-base-300"
@doc """
Returns a darkened background color class for a given type.
Suitable for use with white text on dark UI backgrounds.
"""
def type_color_dark("normal"), do: "bg-[#6B6A4E]"
def type_color_dark("fire"), do: "bg-[#9E5520]"
def type_color_dark("water"), do: "bg-[#3D5A9E]"
def type_color_dark("grass"), do: "bg-[#4A7A2E]"
def type_color_dark("electric"), do: "bg-[#A0871C]"
def type_color_dark("ice"), do: "bg-[#5A8A87]"
def type_color_dark("fighting"), do: "bg-[#7A1D19]"
def type_color_dark("poison"), do: "bg-[#6A2868]"
def type_color_dark("ground"), do: "bg-[#927A40]"
def type_color_dark("flying"), do: "bg-[#6B5A9E]"
def type_color_dark("psychic"), do: "bg-[#A03558]"
def type_color_dark("bug"), do: "bg-[#6A7710]"
def type_color_dark("rock"), do: "bg-[#746822]"
def type_color_dark("ghost"), do: "bg-[#493760]"
def type_color_dark("dragon"), do: "bg-[#4622A0]"
def type_color_dark("dark"), do: "bg-[#48372D]"
def type_color_dark("steel"), do: "bg-[#747485]"
def type_color_dark("fairy"), do: "bg-[#8A546E]"
def type_color_dark(_), do: "bg-base-300"
@doc """
Returns the text color class for a given type.
"""

View File

@@ -145,7 +145,7 @@ defmodule CobblemonUiWeb.PokemonComponents do
:for={type <- @types}
class={[
"inline-block text-[9px] font-semibold uppercase tracking-wide px-1.5 py-0.5 rounded leading-none text-white/90",
CobblemonUi.TypeChart.type_color(type)
CobblemonUi.TypeChart.type_color_dark(type)
]}
>
{type}