Opacity can be added to hsl values using the following syntax:
background: hsla(213, 34%, 12%, .5);
Similarly, opacity can also be applied to rgb values like this:
background: rgba(134, 231, 54, .5);
But have you ever wondered how we can add opacity to hex values?