This information that’s housed in my ‘rgb’ variable is an Array that stores four values. Red, Green, Blue and Alpha (rgba). Each value goes between 0-1 not 0-255 as you might expect.
The next step is to convert this RGB array into an HSL array. I do this with my rgbToHsl() method. I now create a new variable called ‘hsl’ that holds the conversion like this.