Skip to content

Possible to create invalid RGB values from valid L*a*b* values #6

@mfeif

Description

@mfeif

Hi there.

I found that I am able to make non-sensical values from the NewFromLab() static method:

grapefruit.Color.NewFromLab(22.3, 0.46, 0.32)

returns

(0.4543231902651164, -0.02054214971445302, 0.01816673658213256, 1.0)

Your docs say:
"All the operations assume that you provide values in the specified ranges, no checks are made whatsoever. If you provide a value outside of the specified ranges, you’ll get some strange results..."

But also that the requirements for l, a, b are:
l: The L component [0...100]
a: The a component [-1...1]
b: The a component [-1...1]

The calculations from here http://www.easyrgb.com/ seem to lead to approximately:
(0.210, 0.208, 0.207)

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