I want to be able to insert a list of colors by name and then be able to easily use them in text. Color names like "abyssal_green" or "lotus_red" with associated color codes.
What I am doing currently is
local richtext_color = require "richtext.color"
local function richtext_insert_colors()
richtext_color.COLORS["abyssal_green"] = richtext_color.parse_hex("#05f0bc") -- #14ffb9
richtext_color.COLORS["lotus_red"] = richtext_color.parse_hex("#ff0946")
end
Maybe make it a richtext main function to add a color to the list by name.
richtext.add_color("name", "code")
Where code is auto detected to be RGB/RGBA/hex/hexa, and if the color already existed it would silently replace it.
I want to be able to insert a list of colors by name and then be able to easily use them in text. Color names like "abyssal_green" or "lotus_red" with associated color codes.
What I am doing currently is
Maybe make it a richtext main function to add a color to the list by name.
Where code is auto detected to be RGB/RGBA/hex/hexa, and if the color already existed it would silently replace it.