Skip to content

[Hsv | Hsl]ToRrb returning incorrect values #4

@jtrahan

Description

@jtrahan

Hello, I am currently using the version that is on NuGet and I stubbled across this issue by accident. Something in the calculations is incorrect for this method. For example when I pass a HSV or HSL value of {0,0,23} I should be getting back an RGB of {58,58,58}. But instead I'm getting an RGB value of {255,255,255}.

You can replicate the issue by using the following code to test
var rgb = new RGB(58, 58, 58);
var hsv = ColorConverter.RgbToHsv(rgb);
var hsl = ColorConverter.RgbToHsl(rgb);
var vrgb = ColorConverter.HsvToRgb(hsv);
var lrgb = ColorConverter.HslToRgb(hsl);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions