From 96179de06ab3a8ed412d8c4d5aa29d0c4c2d31ff Mon Sep 17 00:00:00 2001 From: Michael Carlberg Date: Wed, 29 Jun 2016 12:43:13 +0200 Subject: [PATCH] feat: Support alpha using tags %{F#00} --- src/services/builder.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/services/builder.cpp b/src/services/builder.cpp index 527f16cb..e09af090 100644 --- a/src/services/builder.cpp +++ b/src/services/builder.cpp @@ -371,6 +371,13 @@ void Builder::color_alpha(std::string alpha_) { auto alpha(alpha_); 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) { val.append(val.substr(val.size() - 3)); } else if (val.length() > 6) {