0

I want to find a color whose rgba(r,g,b,0.75) = 46,50,56.

I am working on a theme that has a base color variable in the config file, And in css files it is being used with opacity like this. rgba(var(--base-color),0.75).

I have a base color, lets say rgb(129,45,211). If I change --base-color variable to my color then 75% opacity applies on this color.

I have two options, change 75% opacity in all files that I don't want to do. Find a color which will be equal to my base color after applying 75% opacity. Is it possible to do that?

mysterious
  • 1,450
  • 5
  • 29
  • 56
  • The visual appearance of the resulting color depends on the background color and other factors e.g. the rendering engine. If I understood your question, perhaps you could approximate your desired color using a photo editor, applying the percentage of opacity to a coloured box on a white background. – christo Sep 09 '21 at 16:02
  • Are you talking about the color with 75% opacity being over a white background? – A Haworth Sep 09 '21 at 17:25
  • this can help you: https://stackoverflow.com/a/50574620/8620333 you will find the math there – Temani Afif Sep 09 '21 at 19:37

0 Answers0