API Reference
Composables
| API | Description |
|---|---|
useTheme(options) | Core composable — returns reactive theme state |
createBrandContext(options) | Factory for isolated, namespaced theme engines |
Plugin
| API | Description |
|---|---|
VueMultipleThemesPlugin | Vue plugin for global registration |
Components
| Component | Description |
|---|---|
<VueMultipleThemes> | Wrapper component (registers via plugin) |
<VmtThemePicker> | Headless theme picker with keyboard nav & ARIA |
<VmtIcon> | Icon forwarder — bring your own icon library |
Color Utilities
| Function | Description |
|---|---|
hexToRgb | Hex → [R, G, B] |
rgbToHex | [R, G, B] → Hex |
hexToHsl | Hex → [H, S, L] |
hslToHex | [H, S, L] → Hex |
parseColor | Any CSS color → [H, S, L] |
lighten | Increase lightness |
darken | Decrease lightness |
saturate | Adjust saturation |
rotateHue | Shift hue by degrees |
mix | Mix two colors |
withAlpha | Add alpha channel |
luminance | WCAG relative luminance |
contrastRatio | WCAG contrast ratio |
autoContrast | Pick text color for readability |
ensureContrast | Adjust until WCAG AA met |
generateColorScale | 11-stop Tailwind-style scale |
complementary | 180° color harmony |
triadic | 120° color harmony |
analogous | Adjacent hue harmony |
normalizeToRgbChannels | Any format → "R G B" channels |
Theme Generators
| Function | Description |
|---|---|
generateLightTheme | WCAG-compliant light theme from one color |
generateDarkTheme | WCAG-compliant dark theme from one color |
generateThemePair | Matched light+dark pair |
generateThemeFromPalette | Theme from multi-color palette |
generateSeasonalThemes | Mood/season theme pairs |
buildCssMixTheme | CSS color-mix() theme |
checkContrast | WCAG contrast report |