Closed mrWinston closed 2 months ago
Nice job! It would be great if treating all RGB color as RGBA color. If the user pass RGB hex color, convert it to RGBA color with ff
alpha channel, if we do this, we only need to handle the RGBA processing logic.
This PR makes sure, that the
bg_color
setting value also supports specifying the alpha channel in the format#RRGGBBAA
. Omitting the alpha channel value results in the same behaviour as before, so this change should not break any existing configurations.Codewise, the main change is that i moved the validation of the
bg_color
string into it's own function and added a short snippet to extract the alpha channel value from thebg_color
or255
if it's not specified. Let me know if this looks ok style wise, i'm very very new to rust :)examples
bg_color = "#000000"
:bg_color = "#00000000"
:bg_color = "#00FF0022"
: