Fix color mixing and gradients in luma space (#4424)

Co-authored-by: Laurenz <laurmaedje@gmail.com>
This commit is contained in:
Eric Biedert 2024-06-22 11:09:28 +02:00 committed by GitHub
parent 0fbec82035
commit 381a82e764
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 1 deletions

View File

@ -1191,7 +1191,7 @@ impl Color {
Color::Hsv(Hsv::new(RgbHue::from_degrees(m[0]), m[1], m[2], m[3]))
}
ColorSpace::Cmyk => Color::Cmyk(Cmyk::new(m[0], m[1], m[2], m[3])),
ColorSpace::D65Gray => Color::Luma(Luma::new(m[0], m[1])),
ColorSpace::D65Gray => Color::Luma(Luma::new(m[0], m[3])),
})
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 B

View File

@ -329,3 +329,7 @@
#color.hsl(blue) \
#color.hsv(blue) \
#luma(blue)
--- issue-color-mix-luma ---
// When mixing luma colors, we accidentally used the wrong component.
#rect(fill: gradient.linear(black, silver, space: luma))