A boost curve or a secondary curve, allows the transformation of the input saturation or luminosity as a function of the hue as specified by the boost-curve. For example to desaturate all hues except red, a boost curve that is negative for all hues apart from red can be used.
Boost curves are defined as a positive or negative boost (about the existing value) as a function of the hue. The boost is represented along the x axis and the hue along the y axis. The central boost values are shown in the relevant hue.
The boost curve transformation is coded as below assuming the boost method returns the curve value for the given hue. (See the stet image representation if this isn't clear).
for(var byte in image)
{
hsl = rgb_to_hsl([image[byte], image[byte + 1], image[byte + 2]]);
hsl.saturation += boost(hsl.hue);
rgb = hsl_to_rgb(hsl);
image[byte] = rgb[0];
image[byte + 1] = rgb[1];
image[byte + 2] = rgb[2];
}
Back to blog