To check the hsl values for a layer would require taking an average of all the pixels and getting it from that. At least that's how I understand it.
The only reliable way to get all the pixels that I know of is to use the snapshot action to get an image of the screen. Then you could load that image to a Sprite, resize it to 1x1, and paste that to a canvas object (third party plugin that can read pixels from an image). Basically make the canvas object 1x1 in the editor, and position the Sprite object in the same position.
Finally use the canvas.redAt(0,0) and similar functions to get the rgb average, more or less, of the layer. You can convert the rgb to hsl with algorithms that can be found online.
Anyways, that probably would work, just not very fast.
Really though this isn't something easily done in c2 if at all.