RGB to HSL

Hello Guys,

Hope you all are doing great. I want to convert RGB Mesh colours from Ecotect to HSL so that I can use the values as influence for extrusion and other things. 

Can you help me with this? A grasshopper solution will be amazing. I dont know how to switch between the two colour modes.