I'm wondering if there is a way to blend two transparent colours laid over eachother, to achieve a predetermined colour.
I have a menu bar. The background colour of the bar is rgb(0, 0, 0, 0.75)
. The logo on the top-left has a solid red background of #9B0506
. You can check it out live at http://www.phoenixwebdev.com.au/about-our-services/ecommerce/. The site is a work in progress.
I want to make this red partially transparent, but achieve the exact same red, visually, when there is white behind the menu bar. The transparent black is behind the red and will affect the colour.
Is there a way to calculate the hex value of the red to achieve this? I don't even know how to achieve this with a single transparent item against a solid background let alone with the black complicating things. I can't eyeball it, as I'm colourblind. Even if I could a mathematical solution would nag at me.
So for my situation I'm looking for a method to solve mystery transparent red colour
stacked on rgb(0, 0, 0, 0.75)
stacked on white
= #9B0506
I had a read about css blending at https://css-tricks.com/basics-css-blend-modes/. However this doesn't do what I'm talking about.