I have some HEX colour values in Stylus similar to the following
$my-background ?= #123456
$my-foreground ?= #ABCDEF
and would like to use them in rgba values for opacity, so that
.my-class
background rgba($my-background, .5)
foreground rgba($my-foreground, .5)
or an alternative syntax is compiled into CSS as
.my-class {
background rgba(18, 52, 86, .5);
foreground rgba(171, 205, 239, .5);
}
Is there a quick and easy way to use HEX colour values in rgba using Stylus or a plugin for Stylus (such as nib)?