Introduction
In this lab, we will be exploring the process of converting RGB values to hexadecimal color codes in JavaScript. We will be using bitwise left-shift operator and Number.prototype.toString()
to convert the given RGB parameters to a 6-digit hexadecimal value using String.prototype.padStart()
. This lab will help you understand the conversion process and give you hands-on experience with the implementation of the algorithm in JavaScript.