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!
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 trial
Chelsea Hulbert2,238 Points
What is the benefit to having these different color values?
Why would one use the rgb/rgba method over hexadecimal or the name of the color? Is the color value a matter of preference or is there an important difference that I'm missing?
Tobias Helmrich31,602 Points
there is no real reason to use a specific way to define colors, it's more a matter of personal preference. I mostly use hex values because colors are almost always specified with their hex value, it's also easier to copy and paste the hex value from certain applications than copying all of the three (or four with the alpha value) values for RGB and the way to write hex values in CSS is also way shorter/easier than RGB. The problem with the name of colors is of course that there are less possibilities.
I think it's most important to stay consistent and not mix all of the different ways to add colors together randomly. :)