Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Commit f2e2499

Browse files
committed
Fix color allocation from percentages
Fixes #1332
1 parent c31d145 commit f2e2499

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

functions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ namespace Sass {
210210

211211
inline double color_num(Number* n) {
212212
if (n->unit() == "%") {
213-
return std::min(std::max(n->value(), 0.0), 1.0) * 255;
213+
return std::min(std::max(n->value(), 0.0), 100.0) * 2.55;
214214
} else {
215215
return std::min(std::max(n->value(), 0.0), 255.0);
216216
}

0 commit comments

Comments
 (0)