If I have the following CSS code:
.example {
background-color: rgba(0, 0, 0, 0.5);
border-color: rgba(0, 0, 0, 0.5);
}
Even though the background-color and border-color share the same rgba value, they appear as different colors due to how the border-color is calculated on top of the background-color.
(For a simple example, see http://jsfiddle.net/BBdB3/)
What transparency value for the border-color would make it identical to the background-color? How can this be calculated?
Edit: Thank you all for your responses; setting the border-color to rgba(0, 0, 0, 0) or simply using transparency solves my initial issue. However, there's another challenge (http://jsfiddle.net/CPK7L/2/). In this scenario, I need to align the border-color of the first element with that of the second element.
So, what formula could be used to determine the alpha value of the border for the first element based on the alpha value of the second element?