Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Dj Dimick
7,907 PointsDoes the Color Palette variables within Sass work with RGBA values or just the Hexadecimal?
Can this be used for the other coloring styles rather than just Hexadecimal?
1 Answer

Mate Vegh
25,607 PointsYes, they do! In Sass you can specify your colors in almost any color value: HEX, RGB, RGBA, HSL, HSLA
Sass:
$hex: #007FFF;
$rgb: rgb(0,127,255);
$rgba: rgba(0,127,255,.5);
$hsl: hsl(210,100%,50%);
$hsla: hsla(210,100%,50%,.5);
.element {
color: $hex;
color: $rgb;
color: $rgba;
color: $hsl;
color: $hsla;
}
CSS:
.element {
color: #007FFF;
color: #007fff;
color: rgba(0, 127, 255, 0.5);
color: #007fff;
color: rgba(0, 127, 255, 0.5);
}
Try it out on www.sassmeister.com
Adnan Pozegić
12,789 PointsAdnan Pozegić
12,789 PointsAlso keep an eye on that pesky IE support, from the reference: