Skip to content

System.Drawing.Color has methods for Hue/Sat/Brightness, but actually calcs in HSL #20918

@ctolkien

Description

@ctolkien

As per the HSL and HSV wiki:

HSL stands for hue, saturation, and lightness (or luminosity), and is also often called HLS. HSV stands for hue, saturation, and value, and is also often called HSB (B for brightness).

(Emphasis my own)

System.Drawing.Color has methods for GetHue(), GetSaturation(), and GetBrightness().

One might assume that these methods would then return values using the HSV/HSB format, however they do not. They are using HSL.

This is not really intuitive (especially as this doesn't seem to be documented). Appreciate changing how they work is unlikely to fly due to back compat.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.DrawingdocumentationDocumentation bug or enhancement, does not impact product or test code

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions