Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialOsama Mansour
1,411 Pointswhen do i use the rgba ?
what does the percentage or the decimal number in the rgba function do to the color? when do i use the rgba function ? what is the difference between rgba and rgb?
1 Answer
Walter Allen
iOS Development with Swift Techdegree Student 16,023 PointsIn rgba and rgb, the 'r' stands for 'red,' the 'g' stands for 'green,' and the 'b' stands for blue. In rgba, the 'a' stands for 'alpha.' What the alpha value does is create an opacity or transparency for the color. For example, and alpha value of 1 is completely opaque, while an alpha value of 0 is complete transparent. A value in between, i.e. .5, or 50%, is half-transparent.
Does that help? You can read more here: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#rgba.
Osama Mansour
1,411 PointsOsama Mansour
1,411 Pointsthank you
Walter Allen
iOS Development with Swift Techdegree Student 16,023 PointsWalter Allen
iOS Development with Swift Techdegree Student 16,023 PointsNo problem. If it answered your question, do me a favor and upvote/mark it as best answer. If not, let me know what other question you have and I'll try to answer it. :) Happy programming!
Lisa Carbonell
Full Stack JavaScript Techdegree Graduate 16,926 PointsLisa Carbonell
Full Stack JavaScript Techdegree Graduate 16,926 PointsThank you.
Shaked Gvirtsman
2,270 PointsShaked Gvirtsman
2,270 PointsThank you. Really helped me:)