Added /rainbow

This commit is contained in:
Cooldude2606
2019-04-15 22:59:31 +01:00
parent 1bcb407faa
commit 361513c657
4 changed files with 64 additions and 1 deletions

View File

@@ -19,6 +19,7 @@ local Colours = require 'resources.color_presets'
local Game = require 'utils.game'
local Util = require 'util'
require 'utils.table'
require 'utils.math'
local Public = {}
@@ -496,4 +497,10 @@ function Public.table_keysort(tbl)
return _tbl
end
function Public.format_chat_colour(message,color)
color = color or Colours.white
local color_tag = '[color='..math.round(color.r,3)..','..math.round(color.g,3)..','..math.round(color.b,3)..']'
return string.format('%s%s[/color]',color_tag,message)
end
return Public