
[Feature] Health and Powerbar Gradient colours
ShimantoRahman opened this issue ยท 2 comments
Currently users can customize the class colours used for the health bars using a snippet:
CUSTOM_CLASS_COLORS = {
DEATHKNIGHT = {r = 0.76862752437592, g = 0.11764706671238, b = 0.22745099663734, colorStr = "ffc41e3a"},
DEMONHUNTER = {r = 0.63921570777893, g = 0.18823531270027, b = 0.78823536634445, colorStr = "ffa330c9"},
DRUID = {r = 1, g = 0.48627454042435, b = 0.039215687662363, colorStr = "ffff7c0a"},
EVOKER = {r = 0.20000001788139, g = 0.57647061347961, b = 0.49803924560547, colorStr = "ff33937f"},
HUNTER = {r = 0.66666668653488, g = 0.82745105028152, b = 0.44705885648727, colorStr = "ffaad372"},
MAGE = {r = 0.24705883860588, g = 0.78039222955704, b = 0.9215686917305, colorStr = "ff3fc7eb"},
MONK = {r = 0, g = 1, b = 0.59607845544815, colorStr = "ff00ff98"},
PALADIN = {r = 0.95686280727386, g = 0.54901963472366, b = 0.7294117808342, colorStr = "fff48cba"},
PRIEST = {r = 1, g = 1, b = 1, colorStr = "ffffffff"},
ROGUE = {r = 1, g = 0.95686280727386, b = 0.4078431725502, colorStr = "fffff468"},
SHAMAN = {r = 0, g = 0.43921571969986, b = 0.8666667342186, colorStr = "ff0070dd"},
WARLOCK = {r = 0.52941179275513, g = 0.53333336114883, b = 0.93333339691162, colorStr = "ff8788ee"},
WARRIOR = {r = 0.77647066116333, g = 0.60784316062927, b = 0.42745101451874, colorStr = "ffc69b6d"},
}
However, if the user wishes to use gradient colours, this is currently not possible.
The reason I want to add this functionality is to match the gradient theme used by the ElvUI plugin ToxiUI.
My proposed solution is to expose a constant CUSTOM_CLASS_GRADIENTS
which users can define in the snippets.
It could look like this:
CUSTOM_CLASS_GRADIENTS = {
DEATHKNIGHT = {minR = 0.76862752437592, minG = 0.11764706671238, minB = 0.22745099663734, minColorStr = "ffc41e3a", maxR = 0.96078431372549, maxG = 0.149019607843137, maxB = 0.32156862745098, maxColorStr = "f52652"},
...
}
A similar option can be available for power bars:
CUSTOM_POWER_GRADIENTS = {
MANA = {minR = 0.76862752437592, minG = 0.11764706671238, minB = 0.22745099663734, minColorStr = "ffc41e3a", maxR = 0.96078431372549, maxG = 0.149019607843137, maxB = 0.32156862745098, maxColorStr = "f52652"},
...
}
Alternatively, it could also be added into the option UI.
Similar as the image shown above.
I have a very rudimentary version which works, let me know if this is a feature which you are interested in.
If so, I would like to open a pull request.
Sorry for the very late response...
Yeah, will add this feature in a future release ๐
I will start refactoring Cell in the coming week.
Therefore, I apologize for being unable to process pull requests for the time being.
Once the new version is released, if there are any issues, I would be happy if you could provide suggestions or submit a pull request. ๐