Skip to content

What's the new and improved way to override the gray color, to lets say, slate or stone? #16400

Answered by adamwathan
marchershey asked this question in Help
Discussion options

You must be logged in to vote

We explored coming up with some clever syntax for this but ultimately decided the right thing to recommend is just defining the colors in the most basic way possible.

Here's an example of taking all of the zinc shades but calling them gray instead:

@import "tailwindcss";

@theme {
  --color-gray-50: oklch(0.985 0 0);
  --color-gray-100: oklch(0.967 0.001 286.375);
  --color-gray-200: oklch(0.92 0.004 286.32);
  --color-gray-300: oklch(0.871 0.006 286.286);
  --color-gray-400: oklch(0.705 0.015 286.067);
  --color-gray-500: oklch(0.552 0.016 285.938);
  --color-gray-600: oklch(0.442 0.017 285.786);
  --color-gray-700: oklch(0.37 0.013 285.805);
  --color-gray-800: oklch(0.274 0.006 286.033)…

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

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

@babakfp
Comment options

Answer selected by marchershey
Comment options

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

@wongjn
Comment options

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