Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

Custom color palettes unsupported #17

@lgladdy

Description

@lgladdy

Tailwinds supports custom color palettes: https://tailwindcss.com/docs/customizing-colors#custom-colors

At the moment, this plugin has very weird behaviour with this kind of configuration as it's looking for numbered shades as per a default configuration.

I've quickly patched this on a fork so we can continue working with it (lgladdy@74fb5c5) but I'm not sure of the repercussions of removing isNaN, so didn't want to submit it as a PR without discussion.

If you follow the custom configuration example on tailwind's docs, you'll end up with duplicate key names because of the isNaN check, and the majority of your colours will be excluded. Removing this isNaN check (and enabling shades) forces the correct generation with my patch, but this is probably not the best way of moving forward.

Potentially, the best solution would be to check for NaN keys which still have a value, and auto-enable shades in that case, and remove the isNaN check?

I'm happy to write this code and submit a PR, but would value some input from the core dev(s) on if this seems sensible?

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions