0

I have a CSS property which stores a colour, e.g.

:root {
    --c: #FF00000
}

I want to know how I can get the colour stored in the property, and change the value of the alpha channel.

Other posts with a similar question (here, and here) have answers saying that the colour property should be defined numerically like --c: 255, 0, 0, which then enables the use of rgba(var(--c), 0.5). I want to know specifically if there is a way to change the opacity when the colour property is defined as a colour.

skillz21
  • 154
  • 10

0 Answers0