Skip to content

[v4] is it possible to have HEX values output for colors? #15119

Answered by adamwathan
cossssmin asked this question in Help
Discussion options

You must be logged in to vote

Any reason you can't override the default color palette with a hex-based color palette?

@import "tailwindcss";

@theme {
  --color-*: initial;
  --color-gray-50: #f9fafb;
  /* ... */
}

You can even just copy the v3 color palette and put it in there since the v4 color palette is just the OKLCH-ified version of those original hex colors but with a few colors adjusted to take advantage of the wider gamut (which you lose going back to hex anyways).

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@cossssmin
Comment options

Comment options

You must be logged in to vote
2 replies
@cossssmin
Comment options

@adamwathan
Comment options

Answer selected by cossssmin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants