In the scripts folder, there is a formatting_settings.txt file.
This file will allow you to change the foreground colors of dc++ upon entering a hub.
Does anyone know what all of the usable colors are? I'm trying to find a list and am unsuccessfully found anything.
Thank you
Marooned
formatting_settings.txt
Moderator: Moderators
LUA support is not a feature of DC++, which is why the topic was moved.
The colors are defined in formatting.lua
As you see, you could redefine them or add more, if you'd like. :)
The colors are defined in formatting.lua
Code: Select all
-- color conversion types
formatting.color_conversion = {}
formatting.color_conversion.black = {0, 0, 0}
formatting.color_conversion.white = {255, 255, 255}
formatting.color_conversion.gray = {127, 127, 127}
formatting.color_conversion.red = {255, 0, 0}
formatting.color_conversion.green = {0, 255, 0}
formatting.color_conversion.blue = {0, 0, 255}
formatting.color_conversion.yellow = {255, 255, 0}
formatting.color_conversion.magenta = {255, 0, 255}
formatting.color_conversion.cyan = {0, 255, 255}
-- dark variants
formatting.color_conversion.darkgray = {63, 63, 63}
formatting.color_conversion.darkred = {127, 0, 0}
formatting.color_conversion.darkgreen = {0, 127, 0}
formatting.color_conversion.darkblue = {0, 0, 127}
formatting.color_conversion.darkyellow = {127, 127, 0}
formatting.color_conversion.darkmagenta = {127, 0, 127}
formatting.color_conversion.darkcyan = {0, 127, 127}
-- aliases
formatting.color_conversion.brown = formatting.color_conversion.darkyellow
formatting.color_conversion.grey = formatting.color_conversion.gray
formatting.color_conversion.darkgrey = formatting.color_conversion.darkgray
formatting.color_conversion.lightgrey = formatting.color_conversion.lightgray
-- convert colors..
function formatting.setColors()
formatting.color = {}
for k,v in formatting_opt.color do
if formatting.color_conversion[v] then
local c = formatting.color_conversion[v]
formatting.color[k] = "\\red"..c[1].."\\green"..c[2].."\\blue"..c[3]..";"
else
formatting.color[k] = v
end
-- optionally invert color
if formatting.background_is_dark then
local ret,c,r,g,b = string.find( formatting.color[k], "^\\red(%d+)\\green(%d+)\\blue(%d+);$" )
if ret then
formatting.color[k] = "\\red"..(255-tonumber(r))..
"\\green"..(255-tonumber(g))..
"\\blue"..(255-tonumber(b))..";"
end
end
end
end