mirror of
https://github.com/danog/dart-sass.git
synced 2025-01-22 13:51:31 +01:00
Fix an RGB-to-HSL bug.
This commit is contained in:
parent
ce8e223d88
commit
a15bc625bf
@ -179,10 +179,10 @@ class SassColor extends Value {
|
|||||||
|
|
||||||
if (max == min) {
|
if (max == min) {
|
||||||
_saturation = 0;
|
_saturation = 0;
|
||||||
} else if (_lightness < 0.5) {
|
} else if (_lightness < 50) {
|
||||||
_saturation = 5000 * delta / _lightness;
|
_saturation = 100 * delta / (max + min);
|
||||||
} else {
|
} else {
|
||||||
_saturation = 5000 * delta / (100 - _lightness);
|
_saturation = 100 * delta / (2 - max - min);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user