Skip to content

Setting lab lightness value does not work as expected? #108

@JuanPotato

Description

@JuanPotato

I would expect pastel set lightness 100 to set a color's lab lightness to 100. The code does seem to try and set lab.l = value but it doesn't actually result in a lab lightness value of 100. Which seemed odd.

 % pastel format lab orange
Lab(75, 24, 79)
 % pastel set lightness 100 orange | pastel format lab
Lab(92, -8, 68)

I have no idea if this is an issue with converting between colorspaces or just unavoidable.

At 149, the lab lightness value seems to be shown as 100, but it isn't pure white.

 % pastel set lightness 149 orange | pastel format lab
Lab(100, -3, 9)

At 156, it finally reaches pure white.

 % pastel set lightness 156 orange | pastel format lab
Lab(100, 0, -0)

You can keep try setting it to 100 lightness and it will increase slightly which is odd

 % pastel set lightness 100 orange | pastel format lab
Lab(92, -8, 68)
 % pastel set lightness 100 orange | pastel set lightness 100 | pastel format lab
Lab(98, -17, 65)
 % pastel set lightness 100 orange | pastel set lightness 100 | pastel set lightness 100 | pastel format lab
Lab(98, -17, 63)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions