Hue Shift Degrees Tool

Rotate actual RGB hue through HSL while preserving saturation/lightness; this is not CSS hue-rotate matrix equivalence and achromatic hue evidence stays absent.

Description

HSL hue rotation preserves saturation and lightness.

HSL hue rotation preserves saturation and lightness. An achromatic source has no observed hue to preserve.1, 2

Enter normalized RGB and signed hue shift bounded±10^9 degrees. Convert to HSL, rotate hue and return HSL/RGB plus chromatic-evidence flag when source saturation>0.

When to use Hue Shift Degrees Tool

Use Hue Shift Degrees Tool when you need to evaluate the supplied records under the calculation and evidence rules below. No CSS matrix equivalence or latent neutral hue 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 Hue Shift Degrees Tool 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, signedHueShiftDegrees using the field table and calculation rules, then run the tool.
  3. Read rotatedHsl, rotatedRgb, chromaticHueEvidencePresent. 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
signedHueShiftDegreesSigned hue shift degreesnumberRequired

Enter normalized RGB and signed hue shift bounded±10^9 degrees. Convert to HSL, rotate hue and return HSL/RGB plus chromatic-evidence flag when source saturation>0.

newHue=normalize(originalHue+normalize(shift))

Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.

Output fieldMeaningValue type
rotatedHslRotated hsllist of number
rotatedRgbRotated rgblist of number
chromaticHueEvidencePresentChromatic hue evidence presentboolean
json
{
  "input": {
    "baseRgb": [
      1,
      0,
      0
    ],
    "signedHueShiftDegrees": 120
  },
  "output": {
    "rotatedHsl": [
      120,
      1,
      0.5
    ],
    "rotatedRgb": [
      0,
      1,
      0
    ],
    "chromaticHueEvidencePresent": true
  }
}

Limitations and assumptions

No CSS matrix equivalence or latent neutral hue 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 CSS hue-rotate Invert Equivalent: CSS invert and hue-rotate are ordered channel filters. The hue-rotate matrix is not generally equivalent to changing HSL hue. For a complementary task, use HSL Saturation Adjust Percent: An additive HSL saturation change uses percentage points. Clipping keeps saturation within its normalized range.

Further background: CSS Color Module Level 4.

References

  1. Hue Shift Degrees Tool — tool.io

  2. CSS Color Module Level 4 — World Wide Web Consortium

Similar or alternative tools

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