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 trialMUZ140191 Prudence Goreraza
9,480 PointsIn the rgb function, the value rgb( , , ) represents 100% white, while the value rgb( , , ) represents 100% black.
please help to answer this quiz question on color values
5 Answers
Damien Watson
27,419 PointsThe 'rgb(red, green, blue)' function accepts 3 numbers, one for each colour. The colours range from '0' (none) to '255' (full). This means if all are set to '0', then there is no colour (black), where all '255' is white.
.black { color:rgb(0,0,0); }
.white { color:rgb(255,255,255); }
/*
Other colours can be achieved by combinations as you
would mix light ... eg
*/
.red { color:rgb(255,0,0); }
.green { color:rgb(0,255,0); }
.blue { color:rgb(0,0,255); }
.orange { color:rgb(255,164,0); }
/* etc. */
Christopher Mlalazi
Front End Web Development Techdegree Graduate 17,305 Pointsit wants 255, 255, 255,and 0, 0, 0. I donβt know why it doesnβt take 000, 000, 000 for back.
Damien Watson
27,419 PointsI know this was a year ago, but... the challenge is looking for '0,0,0' because it is expecting an integer value. Like typing '000' into a calculator, you will get '0' not '000'.
In CSS '000, 000, 000' does actually work but why type 9 characters when you can use 3?
Virginia Chubo
1,182 PointsThats what i typed i got the answer wrong
Damien Watson
27,419 PointsWhats the question?
Ted Barlow
6,440 PointsIn the rgb function, the value rgb(
,
,
) represents 100% white, while the value rgb(
,
,
) represents 100% black.
I don't get that, pls can some help me with it.
Damien Watson
27,419 PointsHey Ted,
I believe the person asking the question didn't know what numbers to put in for white and black, which I answered above.
I'll break it down for you a bit more if that helps. The rgb function accepts 3 numbers which range from '0' to '255'. Think of this number as a slider in photoshop or the like, where '0' is at the left (no colour) and the '255' is at the right (full colour).
The numbers represent red, green and blue, so this colour would be orange: rgb(255,127,0);
red = 255 (full red) green = 127 (half green) blue = 0 ( no blue)
As mixing colours in light is cumulative, the more of each colour, the closer to white you get. The less of each colour takes you closer to black.
Hope this helps clear it up for yourself and future students. Cheers, :D
Mariia Ashurova
10,913 Pointsfill in the correct answer in each blank provided below.
In the rgb function, the value rgb( 252, 255, 255) represents 100% white, while the value rgb( 0, 0, 0) represents 100% black.
MUZ140191 Prudence Goreraza
9,480 PointsMUZ140191 Prudence Goreraza
9,480 Pointsthanks Damien,it worked