2

Is there any advantage in using one against the other. Material design guidelines have used Alpha values to signify contrast for fonts. I could not really find a reason for doing so(as compared to using absolute colour values).

4

When using an alpha value, the color you see depends on the color in the layer below the color with alpha value.

See the example below.

When using a black (#000000) with 50 alpha on a white background you will get the 'actual color code' #7F7F7F, but when you but a blue color behind it, it will influence the actual color code of the #000000 with 50 alpha. In that case it is #277160.

Developers (the ones I've worked with) prefer actual color codes because of this.

enter image description here

| improve this answer | |
2

The Material design guidelines use opacity for readability and accessibility reasons. The example they use on https://material.io/guidelines/style/color.html#color-usability demonstrates the issue:

Using opacity instead of shifting colors often creates better contrast and relative luminance.

| improve 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.