'**SUMMARY**
Apply a color correction curve in HSL space. This method can be used
to change values for each channel. The curves are :py:class:`ColorCurve` class objects.
**PARAMETERS**
* *hCurve* - the hue ColorCurve object.
* *lCurve* - the lightnes / value ColorCurve object.
* *sCurve* - the saturation ColorCurve object
**RETURNS**
A SimpleCV Image
**EXAMPLE**
>>> img = Image("lenna")
>>> hc = ColorCurve([[0,0], [100, 120], [180, 230], [255, 255]])
>>> lc = ColorCurve([[0,0], [90, 120], [180, 230], [255, 255]])
>>> sc = ColorCurve([[0,0], [70, 110], [180, 230], [240, 255]])
>>> img2 = img.applyHLSCurve(hc,lc,sc)
**SEE ALSO**
:py:class:`ColorCurve`
:py:meth:`applyRGBCurve`'

def applyHLSCurve(self, hCurve, lCurve, sCurve):

    temp = cv.CreateImage(self.size(), 8, 3)
    cv.CvtColor(self._bitmap, temp, cv.CV_RGB2HLS)
    tempMat = cv.GetMat(temp)
    tempMat = np.array(self.getMatrix()).copy()
    tempMat[:, :, 0] = np.take(hCurve.mCurve, tempMat[:, :, 0])
    tempMat[:, :, 1] = np.take(sCurve.mCurve, tempMat[:, :, 1])
    tempMat[:, :, 2] = np.take(lCurve.mCurve, tempMat[:, :, 2])
    image = cv.CreateImageHeader((tempMat.shape[1], tempMat.shape[0]), cv.IPL_DEPTH_8U, 3)
    cv.SetData(image, tempMat.tostring(), ((tempMat.dtype.itemsize * 3) * tempMat.shape[1]))
    cv.CvtColor(image, image, cv.CV_HLS2RGB)
    return Image(image, colorSpace=self._colorSpace)
