General question:
How can I calculate RGB values for a color in a way that if I change the alpha component, the color appears to remain the same over a white background?
Additional question:
How can I do the same but with an non-white background color?
Notes:
I am aware of the fact, that this is not possible for all colors. For example the first parameter of rgba(1,0,0,1) can't be increased to compensate an alpha like that
rgba(1.1,0,0,0.9)this is trivial for monochrome colors like in this example:
My current use case:
I am working on an iOS app with a slightly transparent status bar / navigation bar. The bar should appear to have the same color as some (opaque) objects in the content view. If I apply the same color, to the bars but with alpha of 95% as to the content, of course the bars appear to be lighter.
I'll also need a solution with css for a similar web app.