Convert Hexadecimal to RGB String

# Introduction In this lab, we will explore how to convert a hexadecimal color code to an `rgb()` or `rgba()` string using JavaScript. We will learn how to use bitwise operators and masking to extract the RGB values from the hex code. The lab will also cover how to handle 3-digit and 6-digit hex codes and how to incorporate an alpha value into the resulting string.

|60 : 00

Click the virtual machine below to start practicing