summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/core/base/colors.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/core/base/colors.lua b/xmake/core/base/colors.lua
index 752316b17..9c2016b10 100644
--- a/xmake/core/base/colors.lua
+++ b/xmake/core/base/colors.lua
@@ -164,7 +164,7 @@ function colors.rainbow24(index, seed, freq, spread)
local blue = math.sin(freq * index + 4 * math.pi / 3) * 127 + 128
-- make code
- return string.format("%d;%d;%d", red, green, blue)
+ return string.format("%d;%d;%d", math.floor(red), math.floor(green), math.floor(blue))
end
-- make rainbow color256 code by the index of characters (16-256)