Module: Ariadne::ColorHelper

Defined in:
app/helpers/ariadne/color_helper.rb

Constant Summary collapse

VALID_COLORS =
{
  "red": [
    "ariadne:bg-red-500/15",
    "ariadne:text-red-700",
    "ariadne:group-data-hover:bg-red-500/25",
    "ariadne:dark:bg-red-500/10",
    "ariadne:dark:text-red-400",
    "ariadne:dark:group-data-hover:bg-red-500/20",
  ],
  "orange": [
    "ariadne:bg-orange-500/15",
    "ariadne:text-orange-700",
    "ariadne:group-data-hover:bg-orange-500/25",
    "ariadne:dark:bg-orange-500/10",
    "ariadne:dark:text-orange-400",
    "ariadne:dark:group-data-hover:bg-orange-500/20",
  ],
  "amber": [
    "ariadne:bg-amber-400/20",
    "ariadne:text-amber-700",
    "ariadne:group-data-hover:bg-amber-400/30",
    "ariadne:dark:bg-amber-400/10",
    "ariadne:dark:text-amber-400",
    "ariadne:dark:group-data-hover:bg-amber-400/15",
  ],
  "yellow": [
    "ariadne:bg-yellow-400/20",
    "ariadne:text-yellow-700",
    "ariadne:group-data-hover:bg-yellow-400/30",
    "ariadne:dark:bg-yellow-400/10",
    "ariadne:dark:text-yellow-300",
    "ariadne:dark:group-data-hover:bg-yellow-400/15",
  ],
  "lime": [
    "ariadne:bg-lime-400/20",
    "ariadne:text-lime-700",
    "ariadne:group-data-hover:bg-lime-400/30",
    "ariadne:dark:bg-lime-400/10",
    "ariadne:dark:text-lime-300",
    "ariadne:dark:group-data-hover:bg-lime-400/15",
  ],
  "green": [
    "ariadne:bg-green-500/15",
    "ariadne:text-green-700",
    "ariadne:group-data-hover:bg-green-500/25",
    "ariadne:dark:bg-green-500/10",
    "ariadne:dark:text-green-400",
    "ariadne:dark:group-data-hover:bg-green-500/20",
  ],
  "emerald": [
    "ariadne:bg-emerald-500/15",
    "ariadne:text-emerald-700",
    "ariadne:group-data-hover:bg-emerald-500/25",
    "ariadne:dark:bg-emerald-500/10",
    "ariadne:dark:text-emerald-400",
    "ariadne:dark:group-data-hover:bg-emerald-500/20",
  ],
  "teal": [
    "ariadne:bg-teal-500/15",
    "ariadne:text-teal-700",
    "ariadne:group-data-hover:bg-teal-500/25",
    "ariadne:dark:bg-teal-500/10",
    "ariadne:dark:text-teal-300",
    "ariadne:dark:group-data-hover:bg-teal-500/20",
  ],
  "cyan": [
    "ariadne:bg-cyan-400/20",
    "ariadne:text-cyan-700",
    "ariadne:group-data-hover:bg-cyan-400/30",
    "ariadne:dark:bg-cyan-400/10",
    "ariadne:dark:text-cyan-300",
    "ariadne:dark:group-data-hover:bg-cyan-400/15",
  ],
  "sky": [
    "ariadne:bg-sky-500/15",
    "ariadne:text-sky-700",
    "ariadne:group-data-hover:bg-sky-500/25",
    "ariadne:dark:bg-sky-500/10",
    "ariadne:dark:text-sky-300",
    "ariadne:dark:group-data-hover:bg-sky-500/20",
  ],
  "blue": [
    "ariadne:bg-blue-500/15",
    "ariadne:text-blue-700",
    "ariadne:group-data-hover:bg-blue-500/25",
    "ariadne:dark:text-blue-400",
    "ariadne:dark:group-data-hover:bg-blue-500/25",
  ],
  "indigo": [
    "ariadne:bg-indigo-500/15",
    "ariadne:text-indigo-700",
    "ariadne:group-data-hover:bg-indigo-500/25",
    "ariadne:dark:text-indigo-400",
    "ariadne:dark:group-data-hover:bg-indigo-500/20",
  ],
  "violet": [
    "ariadne:bg-violet-500/15",
    "ariadne:text-violet-700",
    "ariadne:group-data-hover:bg-violet-500/25",
    "ariadne:dark:text-violet-400",
    "ariadne:dark:group-data-hover:bg-violet-500/20",
  ],
  "purple": [
    "ariadne:bg-purple-500/15",
    "ariadne:text-purple-700",
    "ariadne:group-data-hover:bg-purple-500/25",
    "ariadne:dark:text-purple-400",
    "ariadne:dark:group-data-hover:bg-purple-500/20",
  ],
  "fuchsia": [
    "ariadne:bg-fuchsia-400/15",
    "ariadne:text-fuchsia-700",
    "ariadne:group-data-hover:bg-fuchsia-400/25",
    "ariadne:dark:bg-fuchsia-400/10",
    "ariadne:dark:text-fuchsia-400",
    "ariadne:dark:group-data-hover:bg-fuchsia-400/20",
  ],
  "pink": [
    "ariadne:bg-pink-400/15",
    "ariadne:text-pink-700",
    "ariadne:group-data-hover:bg-pink-400/25",
    "ariadne:dark:bg-pink-400/10",
    "ariadne:dark:text-pink-400",
    "ariadne:dark:group-data-hover:bg-pink-400/20",
  ],
  "rose": [
    "ariadne:bg-rose-400/15",
    "ariadne:text-rose-700",
    "ariadne:group-data-hover:bg-rose-400/25",
    "ariadne:dark:bg-rose-400/10",
    "ariadne:dark:text-rose-400",
    "ariadne:dark:group-data-hover:bg-rose-400/20",
  ],
  "zinc": [
    "ariadne:bg-zinc-600/10",
    "ariadne:text-zinc-700",
    "ariadne:group-data-hover:bg-zinc-600/20",
    "ariadne:dark:bg-white/5",
    "ariadne:dark:text-zinc-400",
    "ariadne:dark:group-data-hover:bg-white/10",
  ],
}.freeze

Instance Method Summary collapse

Instance Method Details

#include_colors!Object



149
150
151
152
153
154
155
156
# File 'app/helpers/ariadne/color_helper.rb', line 149

def include_colors!
  @variants[:color] ||= {}
  @variants[:color] = {}

  VALID_COLORS.each do |color, classes|
    @variants[:color][color] = classes
  end
end