enter image description here

Is possible to have a semi transparent box on top of a another box that have solid color has the same solid color that i want?

Is there any formula like this?

(0.5 opacity color) + another solid color = expectation color

  • Not sure I understand. Can't you use the same hex color for the overlay box? It'll definitely be closer in color than using a different (and lighter) hex value. Or do you mean you want the overlay box to not have transparency even though you are setting an opacity value?
    – Scott
    Aug 31 '17 at 10:18
  • THe question is quite unclear? Are you asking following. Given thet you know the color you want to have, background and alpha what would the color that needs to be inputed for the alpha value be? If so then the answer is here
    – joojaa
    Aug 31 '17 at 11:13
  • Of course not... If the overlay box has a uniform color (the color you want) then the visible color doesn't depend on what is "below" it, which means the overlay box is fully opaque. In you example if the overlay box is semi transparent, it must assume two different colors, one over the background and another one over the other box.
    – xenoid
    Aug 31 '17 at 13:25

A quess: You are frustrated because making a box transparent also makes its color to look out washed. You want the transparency but also the wanted brightness, hue and saturation at the same time. You cannot use only solid colors because your workflow should be totally rebuilt without the transparency. Right?

50% transparent color over a solid color produces the average as the visible color. Let's assume you want red value RW and you have 50% transparent red value RT over a solid red value RS. The needed transparent red RT = 2*RW-RS. To get all red values 0...255 every time, the system should allow red values -255 to 512. Unfortunately only 0 to 255 are available, so your color range will be limited.

The blending modes can allow more, if they are available in your system. Insert the available modes to your question to make possible to someone having the underhood knowledge of the blending math to assist.

If your work environment allows custom blending formulas, there should be no problems for a person who can apply them.

Another way that needs a math propellerhead is using 16 bit color depth and clever scaling back to normal 8 bit deep colors. This also unfortunately is beyond the scope of this answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.