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.

An additive HSL saturation change uses percentage points. Clipping keeps saturation within its normalized range.1, 2

Enter normalized RGB and finite signed change±100 percentage points. Return adjusted HSL/RGB and clipping flag; achromatic input uses canonical hue 0.

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

  1. 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.
  2. Enter baseRgb, signedSaturationPercentagePoints using the field table and calculation rules, then run the tool.
  3. Read adjustedHsl, adjustedRgb, saturationClamped. The explanation below defines the units, signs, ordering and any flags or placeholder values.
  4. 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 fieldMeaningValue type; see rules belowRequirement
baseRgbBase rgblist of numberRequired
signedSaturationPercentagePointsSigned saturation percentage pointsnumberRequired

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 fieldMeaningValue type
adjustedHslAdjusted hsllist of number
adjustedRgbAdjusted rgblist of number
saturationClampedSaturation clampedboolean
json
{
  "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

  1. HSL Saturation Adjust Percent — tool.io

  2. 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.

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies