Using arbitrary color as rgba() #6551
-
With the new 3.0 release, we can use arbitrary colors (hooray!) in the markup. If I do something like Is rgba notation allowed in arbitrary attributes? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 10 replies
-
@WhitWaldo, with tailwindcss@3.0 you could do something like this Let me know if this helps. E |
Beta Was this translation helpful? Give feedback.
-
@eliottchampault |
Beta Was this translation helpful? Give feedback.
@WhitWaldo, with tailwindcss@3.0 you could do something like this
bg-{color}-{variationNumber}/{opacity}
. You can also do something likebg-[rgb(#,#,#)]/{opacity}
.Here is an example:
bg-orange-500/50
would apply an opacity 0.5 to your orange background-color.Let me know if this helps.
E