The purpose of this section is to describe the three methods of "clipping " offered with the plugin HSL Plus.
Let us begin by explaining the problem of "clipping". Only colours in the model (r, g, b) can be represented in the screen. So to modify colours, the plugin proceeds in three steps:
conversion from (r,g,b) model into (h,s,l) model.
conversion from (h,s,l) model into (r,g,b) model.
Sometimes, a problem appears to the third step: calculated colors cannot be represented on the screen, they are "out of gamut".
For this problem, the plugin proposes five methods:
nearest color: This method clips separately each rgb values. Drawback: It sometimes induces unsightly distortions of tints.
contrast reduction: This method reduces the contrast of problematic colours until they are representable. It uses neutral gray as a reference. Drawback: It sometimes induces an excessive loss of contrast for the luminosity.
non-linear contrast reduction: This method try to find a good compromise between the "contrast reduction" method and the "desaturation" method. An "S curve" is applied to clip the luminosity, hence the name of the method.
median correction: First, the maximal and minimal rgb values are clipped. Then the median rgb value, is recomputed, so that the hue is preserved.
desaturation: desaturate the problematic colours until they are representable. This method has the advantage to respect at most luminosity. Drawback: Colors in the shadows and highlights are excessively desaturated.
To test these four methods, we apply to an image excessive parameters : brightness=25 , contrast=50 , saturation=75, hue=0.