Skip to content

Commit

Permalink
Merge pull request #2113 from mgreter/bugfix/issue-2112
Browse files Browse the repository at this point in the history
Fix error whit hue color change function
  • Loading branch information
mgreter authored Jun 25, 2016
2 parents c6a8169 + 7b5f46c commit 267df0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ namespace Sass {
}
if (hsl) {
HSL hsl_struct = rgb_to_hsl(color->r(), color->g(), color->b());
if (h) hsl_struct.h = static_cast<double>(((static_cast<int>(h->value()) % 360) + 360) % 360) / 360.0;
if (h) hsl_struct.h = std::fmod(h->value(), 360.0);
if (s) hsl_struct.s = ARGR("$saturation", Number, 0, 100)->value();
if (l) hsl_struct.l = ARGR("$lightness", Number, 0, 100)->value();
double alpha = a ? ARGR("$alpha", Number, 0, 1.0)->value() : color->a();
Expand Down

0 comments on commit 267df0d

Please # to comment.