summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2021-09-23 18:01:56 +0800
committerGitHub <[email protected]>2021-09-23 18:01:56 +0800
commitb14cfebf3ff0a88ab9486468c2665732768d6456 (patch)
tree33c11d2980b8d7fadb7283b911e430a0e22891e0
parent71ac42c5651e14dca75ba4a8f611a593b8ecf251 (diff)
Update colors.lua
-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)