     _pos = []
     _min = 0
     _max = 1
+    _correctLightness = false
     _numClasses = 0
 
     # private methods

            return i-1
        return 0

    classifyValue = (value) ->
        val = value
        if _domain.length > 2

            val = _min + ((_domain[i] + (_domain[i+1] - _domain[i]) * 0.5 - minc) / (maxc-minc)) * (_max - _min)
        val

    getColor = (val, bypassMap=false) ->
        if isNaN(val) then return _nacol
        if _domain.length > 2
            c = getClass val
            t = c / (_numClasses-1)
        else
            t = f0 = (val - _min) / (_max - _min)
            t = Math.min(1, Math.max(0, t))

        if not bypassMap
            t = tmap t  # lightness correction

        if type(_colors) == 'array'
            for i in [0.._pos.length-1]
                p = _pos[i]
                if t <= p
                    col = _colors[i]
                    break
                if t >= p and i == _pos.length-1
                    col = _colors[i]
                    break
                if t > p and t < _pos[i+1]
                    t = (t-p)/(_pos[i+1]-p)
                    col = chroma.interpolate _colors[i], _colors[i+1], t, _mode
                    break
        else if type(_colors) == 'function'
            col = _colors t
        col

    setColors colors, positions
