I have set up the colours of my project like so:
$blue: rgb(75, 179, 209);
Is there any way to use this variable and convert the value into RGBa elsewhere as needed?
$color-red: #FF0000; $color-green: #00FF00; $color-blue: #0000FF; Remember, in order to use variables, or any of the benefits of SCSS for that matter, the stylesheet must have the '. scss' extension, and a preprocessor must be part of your website build system.
using rgba instance method
you can
$blue: rgb(75, 179, 209);
body {
background:rgba($blue, .5);
}
can test here: http://sass-lang.com/try.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With