问题:
Say I have a background color with a "ribbon" running over it in another solid color.假设我有一个背景颜色,上面有一条“丝带”,上面有另一种纯色。 Now, I want the ribbon to be partially transparent to let some details blend through, but still keep the ribbon the "same color" over the background.现在,我希望色带部分透明,让一些细节混合通过,但仍然让色带在背景上保持“相同的颜色”。
Is there a way to (easily) determine, for a given opacity/alpha < 100% of the ribbon color, what RGB values it should have to be identical to its color with 100% opacity over the background?有没有办法(轻松)确定,对于给定的不透明度/alpha < 100% 色带颜色,它应该具有哪些 RGB 值与其背景上的 100% 不透明度的颜色相同?
Here's a picture.这是一张图片。 Background is rgb(72, 28, 97)
, ribbon rgb(45, 34, 70)
.背景是rgb(72, 28, 97)
,色带rgb(45, 34, 70)
。 I want a rgba(r, g, b, a)
for the ribbon so that it appears identical to this solid color.我想要一个rgba(r, g, b, a)
作为色带,以便它看起来与这种纯色相同。