CSS Worksheet: Hex and RGB Colours
Code tip (Red, green, blue): rgb(red, green, blue): each from 0 to 255. #rrggbb: the same three numbers in hex. Hex digits: 0–9, then a = 10, b = 11, c = 12, d = 13, e = 14, f = 15. A pair = 16 × first digit + second digit: ff = 16 × 15 + 15 = 255.
NameDateTime takenScore ___ / 40
- 1.🌈 Which colour of light is strongest in rgb(221, 98, 58)? (a) green (b) blue (c) red
- 2.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) red (c) bright green (d) magenta
- 3.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) bright green (c) black (d) blue
- 4.🌈 Which colour is #ff0000? (a) black (b) white (c) yellow (d) red
- 5.🌈 Which colour of light is strongest in rgb(180, 102, 24)? (a) green (b) blue (c) red
- 6.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 255 (c) 99 (d) 1000
- 7.🌈 In #00d600 the green part is the hex number d6. What is it as a normal number?
- 8.🌈 Which colour of light is strongest in rgb(43, 86, 165)? (a) green (b) blue (c) red
- 9.🌈 In #000070 the blue part is the hex number 70. What is it as a normal number?
- 10.🌈 Which hex code is black? (a) #ff0000 (b) #000000 (c) #ffffff (d) #0000ff
- 11.🌈 Which colour is #ff00ff? (a) black (b) yellow (c) magenta (d) red
- 12.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) bright green (c) cyan (d) magenta
- 13.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) white (d) blue
- 14.🌈 In #b90000 the red part is the hex number b9. What is it as a normal number?
- 15.🌈 Which hex code is red? (a) #0000ff (b) #000000 (c) #00ff00 (d) #ff0000
- 16.🌈 In #250000 the red part is the hex number 25. What is it as a normal number?
- 17.🌈 Which hex code is cyan? (a) #000000 (b) #ff00ff (c) #00ffff (d) #ffff00
- 18.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) black (c) blue (d) green
- 19.🌈 Which colour of light is strongest in rgb(53, 173, 11)? (a) blue (b) red (c) green
- 20.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) yellow (c) white (d) red
- 21.🌈 Which colour of light is strongest in rgb(244, 98, 106)? (a) green (b) red (c) blue
- 22.🌈 Which hex code is white? (a) #00ff00 (b) #0000ff (c) #ffffff (d) #00ffff
- 23.🌈 Which colour of light is strongest in rgb(157, 75, 34)? (a) blue (b) red (c) green
- 24.🌈 Which colour of light is strongest in rgb(173, 16, 13)? (a) red (b) green (c) blue
- 25.🌈 Which hex code is yellow? (a) #000000 (b) #0000ff (c) #ffff00 (d) #ff00ff
- 26.🌈 Which colour of light is strongest in rgb(49, 134, 212)? (a) blue (b) green (c) red
- 27.🌈 Which colour of light is strongest in rgb(0, 15, 220)? (a) blue (b) red (c) green
- 28.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) F (d) Z
- 29.🌈 Which colour of light is strongest in rgb(202, 89, 105)? (a) blue (b) green (c) red
- 30.🌈 In #00db00 the green part is the hex number db. What is it as a normal number?
- 31.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) blue (c) black (d) magenta
- 32.🌈 Which colour of light is strongest in rgb(46, 183, 86)? (a) blue (b) green (c) red
- 33.🌈 Which colour of light is strongest in rgb(119, 169, 9)? (a) blue (b) red (c) green
- 34.🌈 In #c00000 the red part is the hex number c0. What is it as a normal number?
- 35.🌈 Which colour of light is strongest in rgb(46, 105, 207)? (a) green (b) blue (c) red
- 36.🌈 Which colour is #00ffff? (a) yellow (b) white (c) black (d) cyan
- 37.🌈 Which colour of light is strongest in rgb(129, 84, 160)? (a) blue (b) red (c) green
- 38.🌈 In #007b00 the green part is the hex number 7b. What is it as a normal number?
- 39.🌈 In #005300 the green part is the hex number 53. What is it as a normal number?
- 40.🌈 In #150000 the red part is the hex number 15. What is it as a normal number?
Answer key
- red
- cyan
- black
- red
- red
- 255
- 214
- blue
- 112
- #000000
- magenta
- bright green
- blue
- 185
- #ff0000
- 37
- #00ffff
- red
- green
- red
- red
- #ffffff
- red
- red
- #ffff00
- blue
- blue
- F
- red
- 219
- magenta
- green
- green
- 192
- blue
- cyan
- blue
- 123
- 83
- 21
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids