TSL is a color space that is based on Tint, Saturation, and Luminance.
The transformation from RGB to TSL is:
where:
An earlier version of the formula for T used the sign of to determine whether to add or to arctan . That formula generates a discontinuity in the calculated T values for near zero; using the sign of gives a continuous value of for for near zero.
[1]