feat: Support alpha using tags %{F#00}
This commit is contained in:
parent
80e6936cdc
commit
96179de06a
@ -371,6 +371,13 @@ void Builder::color_alpha(std::string alpha_)
|
|||||||
{
|
{
|
||||||
auto alpha(alpha_);
|
auto alpha(alpha_);
|
||||||
std::string val = this->opts->foreground;
|
std::string val = this->opts->foreground;
|
||||||
|
if (alpha.find("#") == 0) {
|
||||||
|
if (alpha.size() == 3)
|
||||||
|
this->color(alpha.substr(0, 3) + val.substr(val.size() - 6));
|
||||||
|
else if (alpha.size() == 4)
|
||||||
|
this->color(alpha + alpha.substr(1));
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (val.size() < 6 && val.size() > 2) {
|
if (val.size() < 6 && val.size() > 2) {
|
||||||
val.append(val.substr(val.size() - 3));
|
val.append(val.substr(val.size() - 3));
|
||||||
} else if (val.length() > 6) {
|
} else if (val.length() > 6) {
|
||||||
|
Loading…
Reference in New Issue
Block a user