Hexadecimal color code for transparency
Hexadecimal color code for transparency. GitHub Gist: instantly share code, notes, and snippets....
background: #ffffff80
or, in JavaScript with a variable, something like background: `${theme.background}80`
. The only catch is remembering the alpha codes and that's where this link comes in handy.
I believe the Gist was originally created back when support was mostly limited to Android (which is why the examples add the alpha codes to the beginning) but, according to Can I use... support is pretty widespread today.
And as a bonus, people in the comments have provided the list in different formats like objects and arrays.