4 ms·
Thanks for your feedback. This area is where TypeScript would play nicely. The library implements types that fully utilize generics to define and impose restri
by aenero 5y ago
Thanks for your feedback.
This area is where TypeScript would play nicely. The library implements types that fully utilize generics to define and impose restrictions for color keys, as well as ensuring type consistency across the color system. * This is the next item in my list to add to the documentation. *
So for example, you can easily implement a color system similar to Material Design 3 that only accepts these color keys: 0 | 10 | 20 | 30 ... 90 | 95 | 98 | 100. But as this is not every color system's approach, the library adopts the least restrictive default, so you can say it's less opinionated.
But for pure JS projects, custom color mapping can do the job if your design system prescribes discrete color keys for palette colors.