[READ-ONLY] Mirror of https://github.com/thoda-dev/DualUniverse. DualUniverse scripts
0

Configure Feed

Select the types of activity you want to include in your feed.

Create console text colors.lua

authored by

Thomas and committed by
GitHub
(Sep 30, 2020, 5:55 PM +0200) ac40a2d7 8b6209c5

+25
+25
tools/console text colors.lua
··· 1 + --[[ 2 + Jericho's system.print() extension -- https://github.com/Jericho1060 3 + Display content in lua chat channel with colors 4 + ]] 5 + system.printColor = function(message, color) system.print('<span style="color:' .. color .. ';">' .. message .. '</span>') end 6 + system.printPrimary = function(message) system.printColor(message, "#007bff") end 7 + system.printsecondary = function(message) system.printColor(message, "#6c757d") end 8 + system.printSuccess = function (message) system.printColor(message, "#28a745") end 9 + system.printDanger = function (message) system.printColor(message, "#dc3545") end 10 + system.printWarning = function (message) system.printColor(message, "#ffc107") end 11 + system.printInfo = function (message) system.printColor(message, "#17a2b8") end 12 + 13 + --[[ 14 + USAGE 15 + if you want some standard bootstrap colors you can use these methods 16 + system.printPrimary("test Primary") 17 + system.printSecondary("test Secondary") 18 + system.printSuccess("test Success") 19 + system.printDanger("test Danger") 20 + system.printWarning("test Warning") 21 + system.printInfo("test Info") 22 + 23 + if you want to use a custom color : 24 + system.printColor("test color", "red") --eg for red, you can also use any HTML Hex color code 25 + ]]