dylanaraps / pywal

🎨 Generate and change color-schemes on the fly.
MIT License
8.22k stars 311 forks source link

Feature Request: Hex value for alpha #660

Open UtkarshVerma opened 2 years ago

UtkarshVerma commented 2 years ago

dunst has this thing where it can't parse rgba values but it can parse #RRGGBBAA values. Could we add a property to the Color class for satisfying this?

I added the following as a property to get what I wanted.

    @property
    def alpha_hex(self):
        """Export the alpha value as a hex number in [00, ff]."""
        return "%0.2x" % int(self.alpha_dec * 255)