0
0
SASSmarkup~5 mins

RGBA and opacity manipulation in SASS - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does RGBA stand for in CSS colors?
RGBA stands for Red, Green, Blue, and Alpha. Alpha controls the transparency of the color.
Click to reveal answer
beginner
How do you write a semi-transparent red color using RGBA in Sass?
You write it as rgba(255, 0, 0, 0.5). The last number 0.5 means 50% opacity.
Click to reveal answer
intermediate
What is the difference between using opacity property and RGBA alpha channel?
The opacity property changes transparency of the whole element including its children, while RGBA alpha changes only the color transparency.
Click to reveal answer
intermediate
How can you change the opacity of a color variable in Sass without rewriting the whole RGBA value?
Use the rgba() function with the color variable and a new alpha value, like rgba($color, 0.3).
Click to reveal answer
beginner
What range of values can the alpha channel in RGBA take?
Alpha values range from 0 (fully transparent) to 1 (fully opaque).
Click to reveal answer
What does the alpha value in RGBA control?
AThe color brightness
BThe color transparency
CThe color saturation
DThe color hue
Which Sass function can you use to set the opacity of a color variable?
Aopacity()
Btransparent()
Crgba()
Dalpha()
What happens if you set opacity: 0.5 on a container element?
AThe whole container and its children become semi-transparent
BOnly the text becomes transparent
CNothing changes
DOnly the background becomes transparent
Which alpha value means fully opaque in RGBA?
A1
B0.5
C0
D255
How do you write a blue color with 30% opacity in RGBA?
Argba(255, 0, 0, 0.3)
Brgba(0, 0, 255, 3)
Crgba(0, 255, 0, 0.3)
Drgba(0, 0, 255, 0.3)
Explain how RGBA colors work and how you can manipulate opacity using Sass.
Think about how red, green, blue, and alpha combine to create colors with transparency.
You got /4 concepts.
    Describe the difference between using the CSS opacity property and RGBA alpha channel for transparency.
    Consider what happens to child elements when you change opacity versus RGBA.
    You got /3 concepts.