Skip to content

What's the easiest way to access colours #1910

Answered by estevanmaito
hmajid2301 asked this question in Help
Discussion options

You must be logged in to vote

Following the docs, it would look something like this: https://tailwindcss.com/docs/configuration/#referencing-in-javascript

import resolveConfig from 'tailwindcss/resolveConfig'
import tailwindConfig from './tailwind.config.js'

const {theme} = resolveConfig(tailwindConfig)

theme.colors.blue[500]

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@codinginflow
Comment options

@wongjn
Comment options

wongjn Feb 18, 2024
Collaborator

@codinginflow
Comment options

@wongjn
Comment options

wongjn Feb 18, 2024
Collaborator

Answer selected by hmajid2301
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
5 participants