Theme and Color System

This project centralizes Tailwind color fragments and theme tokens in a single composable to ensure consistency across the UI and to keep Tailwind JIT-friendly literal class fragments.

Key files and concepts

Why this exists

How to use

  1. Simple usage in components:
import { useColors } from "@/composables/useColors";
const colorClasses = useColors("green");

// Then in template
// <svg :class="colorClasses.icon" />
// <button :class="colorClasses.button">Save</button>
  1. Use entity-specific helpers:
import { useEntityColors } from "@/composables/useColors";
const projectColors = useEntityColors("projects");
  1. Theme tokens for layout fragments (headers, modals):
import { getThemeClass } from '@/composables/useColors'
<h2 :class="getThemeClass('modalTitle')">Title</h2>

When to add a new color

Notes for tests

Recommendations