Skip to content

API Reference

Composables

APIDescription
useTheme(options)Core composable — returns reactive theme state
createBrandContext(options)Factory for isolated, namespaced theme engines

Plugin

APIDescription
VueMultipleThemesPluginVue plugin for global registration

Components

ComponentDescription
<VueMultipleThemes>Wrapper component (registers via plugin)
<VmtThemePicker>Headless theme picker with keyboard nav & ARIA
<VmtIcon>Icon forwarder — bring your own icon library

Color Utilities

FunctionDescription
hexToRgbHex → [R, G, B]
rgbToHex[R, G, B] → Hex
hexToHslHex → [H, S, L]
hslToHex[H, S, L] → Hex
parseColorAny CSS color → [H, S, L]
lightenIncrease lightness
darkenDecrease lightness
saturateAdjust saturation
rotateHueShift hue by degrees
mixMix two colors
withAlphaAdd alpha channel
luminanceWCAG relative luminance
contrastRatioWCAG contrast ratio
autoContrastPick text color for readability
ensureContrastAdjust until WCAG AA met
generateColorScale11-stop Tailwind-style scale
complementary180° color harmony
triadic120° color harmony
analogousAdjacent hue harmony
normalizeToRgbChannelsAny format → "R G B" channels

Theme Generators

FunctionDescription
generateLightThemeWCAG-compliant light theme from one color
generateDarkThemeWCAG-compliant dark theme from one color
generateThemePairMatched light+dark pair
generateThemeFromPaletteTheme from multi-color palette
generateSeasonalThemesMood/season theme pairs
buildCssMixThemeCSS color-mix() theme
checkContrastWCAG contrast report

Released under the MIT License.