Accessible Theme Builder is an open-source tool that helps developers generate WCAG-compliant color palettes.
Check contrast ratios, preview UI components, and export design tokens for multiple frameworks (CSS, SCSS, Tailwind, UnoCSS).
Build accessible, consistent, and portable design systems with ease.
- Generate color palettes from a brand/base color (10 shades: 50-900)
- Real-time WCAG contrast ratio checks with visual indicators:
- Green: AAA (7+) / AA (4.5+) compliant
- Yellow: AA Large (3+) compliant
- Red: Does not meet WCAG standards
- Live preview of UI components (buttons, cards, text, inputs, links)
- Export tokens in multiple formats:
- CSS Variables
- SCSS Maps
- Tailwind Config
- UnoCSS Config
- System preference detection (prefers-color-scheme)
- Manual toggle with sun/moon icons
- All components fully themed for light and dark modes
- Proper ARIA labels on all interactive elements
- Screen reader friendly with descriptive labels
- Full keyboard navigation support
- Focus ring indicators throughout
- Semantic HTML structure (button elements for clickable items)
- Mobile-first responsive layout
- Flexible grid system:
- Mobile: 2 columns
- Tablet: 3-5 columns
- Desktop: 10 columns
- Stacked panels on mobile, side-by-side on desktop
- Tailwind-styled success/warning alerts
- Slide-in/out animations
- Auto-dismiss (2.5s success, 3.5s warning)
- Mobile responsive
- Vue 3 - Composition API with script setup
- Vite - Fast development and build tool
- Uno CSS - Instant on-demand atomic CSS engine
- Chroma.js - Color manipulation and palette generation
- @madhusha_99/notification-center - Toast notifications
- Node.js 18+
- npm or yarn
# Clone the repository
git clone https://github.com/MadhushaPrasad/accessible-theme-builder.git
# Navigate to the project
cd accessible-theme-builder
# Install dependencies
npm install
# Start development server
npm run devnpm run buildsrc/
βββ App.vue # Main app with dark mode state
βββ style.css # Global styles and toast animations
βββ components/
β βββ ColorPicker.vue # Brand color input with picker
β βββ ContrastBadge.vue # WCAG contrast ratio display
β βββ ExportPanel.vue # Export buttons and toast notifications
β βββ PaletteGrid.vue # Color palette grid display
β βββ PreviewPanel.vue # UI component previews
βββ composables/
βββ useColorEngine.js # Color generation and contrast calculations
βββ useExporters.js # Export format generators
- Select a Brand Color: Use the color picker or enter a hex value
- Generate Palette: Click "Generate" to create a 10-shade palette
- Review Contrast: Check WCAG compliance via color-coded badges
- Preview Components: See how colors look on real UI elements
- Export Tokens: Copy design tokens in your preferred format
:root {
--primary-50: #eff6ff;
--primary-100: #dbeafe;
/* ... */
}module.exports = {
theme: {
extend: {
colors: {
primary: {
50: '#eff6ff',
100: '#dbeafe',
/* ... */
}
}
}
}
}Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is open source and available under the MIT License.

