benjamincanac / ui3

A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.
https://ui.nuxt.com
MIT License
53 stars 7 forks source link

Better color customization experience, using unjs/theme-colors #117

Closed oumarbarry closed 3 months ago

oumarbarry commented 3 months ago

Description

Using unjs/theme-colors, could somehow maybe improve the color theming experience, for both.


Behind the scenes, for you the lib author

and/or

For us, lib users, it could enable enhancement like the ability to pass an arbitrary hex/rgb color code and get shades generated by unjs/theme-colors:

export default defineAppConfig({
  ui: {
    primary: '#BC560A',
    gray: 'cool'
  }
})

Additional context

No response

benjamincanac commented 3 months ago

The colors defined to ui.primary and ui.gray are aliases to Tailwind CSS colors, we can't define your tailwind config inside the app.config.ts. You should be able to use unjs/theme-colors in your tailwind.config.ts though.