HSL Saturation Adjust Percent
Adjust actual RGB saturation by signed HSL percentage points with explicit clipping flag; achromatic input uses canonical hue zero and no arbitrary latent hue is inferred.
Description
An additive HSL saturation change uses percentage points.
When to use HSL Saturation Adjust Percent
Use HSL Saturation Adjust Percent when you need to evaluate the supplied records under the calculation and evidence rules below. No latent source hue, multiplicative saturation scaling or perceptual uniformity is inferred.
Prepare colors in the stated color space and scale. Use encoded RGB fractions, linear RGB, Lab, xy, byte values or ink percentages exactly as requested; supply caller tolerances and reference conditions.
How to use HSL Saturation Adjust Percent and understand its results
- Prepare colors in the stated color space and scale. Use encoded RGB fractions, linear RGB, Lab, xy, byte values or ink percentages exactly as requested; supply caller tolerances and reference conditions.
- Enter baseRgb, signedSaturationPercentagePoints using the field table and calculation rules, then run the tool.
- Read adjustedHsl, adjustedRgb, saturationClamped. The explanation below defines the units, signs, ordering and any flags or placeholder values.
- If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
| Input field | Meaning | Value type; see rules below | Requirement |
|---|---|---|---|
| baseRgb | Base rgb | list of number | Required |
| signedSaturationPercentagePoints | Signed saturation percentage points | number | Required |
Enter normalized RGB and finite signed change±100 percentage points. Return adjusted HSL/RGB and clipping flag; achromatic input uses canonical hue 0.
newS=clamp(oldS+percentagePoints/100,0,1) Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.
| Output field | Meaning | Value type |
|---|---|---|
| adjustedHsl | Adjusted hsl | list of number |
| adjustedRgb | Adjusted rgb | list of number |
| saturationClamped | Saturation clamped | boolean |
{
"input": {
"baseRgb": [
1,
0,
0
],
"signedSaturationPercentagePoints": -50
},
"output": {
"adjustedHsl": [
0,
0.5,
0.5
],
"adjustedRgb": [
0.75,
0.25,
0.25
],
"saturationClamped": false
}
} Limitations and assumptions
No latent source hue, multiplicative saturation scaling or perceptual uniformity is inferred.
Numeric inputs, where present, must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Numeric lists are limited to 10,000 entries; string lists to 128 strings of at most 128 characters each. The rules above may impose smaller limits. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors. A successfully returned false flag is an evaluated outcome; its meaning is explained above.
Alternative or Complementary methods
Use Hue Shift Degrees Tool: HSL hue rotation preserves saturation and lightness. An achromatic source has no observed hue to preserve. For a complementary task, use HSL Lightness Shift Percent: An additive HSL lightness shift uses percentage points rather than a brightness multiplier. Clipped values retain the source hue/saturation.
Further background: CSS Color Module Level 4.
References
-
HSL Saturation Adjust Percent — tool.io
-
CSS Color Module Level 4 — World Wide Web Consortium
Similar or alternative tools
- Hue Shift Degrees Tool
HSL hue rotation preserves saturation and lightness. An achromatic source has no observed hue to preserve.
- HSL Lightness Shift Percent
An additive HSL lightness shift uses percentage points rather than a brightness multiplier. Clipped values retain the source hue/saturation.