Skip to content
Discussion options

You must be logged in to vote

changing the opacity value of background color will make the background color transparent:

<div class="p-4 text-5xl bg-primary/50">😀</div>
<div class="p-4 text-5xl bg-primary/75">😀</div>
<div class="p-4 text-5xl bg-primary/100">😀</div>

Another way is to apply brightness-* class names but it changes the brightness for whole element (not only the background color)

<div class="p-4 text-5xl bg-primary brightness-50">😀</div>
<div class="p-4 text-5xl bg-primary brightness-75">😀</div>
<div class="p-4 text-5xl bg-primary brightness-100">😀</div>

The most practical way is to change the value of a CSS variable using Tailwind CSS arbitrary class names:

<!-- `259 94% 51%` is the primary color of light…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by saadeghi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants