My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more
How to highlight the background color property of your text.

How to highlight the background color property of your text.

Ruth Ikegah's photo
Ruth Ikegah
·May 18, 2020

Sometimes you do not actually have to change the color of your text or your entire background to make the forefront of your text readable, it is possible to add a background color to the particular element holding your text. Just like the image below shows a red background color in the STOP text :

stop.png

Here's how, Using the CSS's RGBA color value which stands for R = Red B = Blue G = Green A = Alpha (level of opacity)

Take note that the RGB values range from 0-255, the the alpha value ranges from 1 (fully opaque) to 0 (fully transparent). So your RGBA color value will have a total of 4 values in the bracket.

Here's what your code will look like:

background-color: rgba(50, 45, 50, 0.1); Thanks for reading !