So I am trying to add an opacity to a background color but the specific background color I am using is coming from the fluent UI library, thus using Design Tokens.
I know normally, I can add opacity to a background color like this
background-color: "rgba(255, 255, 255, 0.5)"
But in my application the background color is set as follows
import tokens from "fluent ui library here"
export const useStyles = makeStyles({
backgroundColor: tokens.colorNeutralBackground2
)}
Does anyone know how I can add opacity to this attribute while using the design token?
2
Answers
assuming colorNeutralBackground2 is a string you can try this:
I don’t know does it works, but how about using
like :
#000000/00 <- transparent
#000000/90 <-opacity 0.9