← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 216 · 40 questions
TalentJR

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. 1.🌈 Which colour is #000000? (a) yellow (b) black (c) white (d) red
  2. 2.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 255 (d) 99
  3. 3.🌈 Which hex code is white? (a) #ff0000 (b) #00ff00 (c) #ffffff (d) #0000ff
  4. 4.🌈 In #00004b the blue part is the hex number 4b. What is it as a normal number?
  5. 5.🌈 Which hex code is bright green? (a) #ffff00 (b) #000000 (c) #00ff00 (d) #ffffff
  6. 6.🌈 Which hex code is black? (a) #0000ff (b) #ff00ff (c) #000000 (d) #ffff00
  7. 7.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) blue (c) bright green (d) white
  8. 8.🌈 Which colour of light is strongest in rgb(164, 10, 39)? (a) green (b) red (c) blue
  9. 9.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) cyan (c) black (d) magenta
  10. 10.🌈 Which colour of light is strongest in rgb(124, 32, 253)? (a) red (b) green (c) blue
  11. 11.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) G (d) Z
  12. 12.🌈 Which hex code is red? (a) #00ff00 (b) #ffffff (c) #00ffff (d) #ff0000
  13. 13.🌈 In #670000 the red part is the hex number 67. What is it as a normal number?
  14. 14.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 6 (d) 4
  15. 15.🌈 Which hex code is yellow? (a) #ffffff (b) #0000ff (c) #ffff00 (d) #ff00ff
  16. 16.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) yellow (c) magenta (d) black
  17. 17.🌈 In #290000 the red part is the hex number 29. What is it as a normal number?
  18. 18.🌈 Which colour is #ffff00? (a) cyan (b) black (c) bright green (d) yellow
  19. 19.🌈 Which colour of light is strongest in rgb(46, 2, 253)? (a) green (b) blue (c) red
  20. 20.🌈 In #0b0000 the red part is the hex number 0b. What is it as a normal number?
  21. 21.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) red (d) white
  22. 22.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) white (c) yellow (d) blue
  23. 23.🌈 In #0000bc the blue part is the hex number bc. What is it as a normal number?
  24. 24.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) red (d) blue
  25. 25.🌈 In #003200 the green part is the hex number 32. What is it as a normal number?
  26. 26.🌈 In #00ec00 the green part is the hex number ec. What is it as a normal number?
  27. 27.🌈 In #000e00 the green part is the hex number 0e. What is it as a normal number?
  28. 28.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) bright green (c) white (d) red
  29. 29.🌈 Which hex code is cyan? (a) #0000ff (b) #000000 (c) #ff0000 (d) #00ffff
  30. 30.🌈 In #190000 the red part is the hex number 19. What is it as a normal number?
  31. 31.🌈 Which colour of light is strongest in rgb(206, 44, 75)? (a) blue (b) red (c) green
  32. 32.🌈 Which colour of light is strongest in rgb(157, 10, 105)? (a) green (b) blue (c) red
  33. 33.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) bright green (c) red (d) black
  34. 34.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) bright green (c) cyan (d) magenta
  35. 35.🌈 Which colour is #00ff00? (a) cyan (b) yellow (c) bright green (d) blue
  36. 36.🌈 Which colour of light is strongest in rgb(115, 253, 22)? (a) green (b) red (c) blue
  37. 37.🌈 Which colour is #ff0000? (a) black (b) cyan (c) magenta (d) red
  38. 38.🌈 Which colour of light is strongest in rgb(139, 191, 44)? (a) red (b) green (c) blue
  39. 39.🌈 Which colour is #ffffff? (a) white (b) blue (c) bright green (d) red
  40. 40.🌈 In #008800 the green part is the hex number 88. What is it as a normal number?

Answer key

  1. black
  2. 255
  3. #ffffff
  4. 75
  5. #00ff00
  6. #000000
  7. bright green
  8. red
  9. cyan
  10. blue
  11. F
  12. #ff0000
  13. 103
  14. 3
  15. #ffff00
  16. white
  17. 41
  18. yellow
  19. blue
  20. 11
  21. blue
  22. blue
  23. 188
  24. red
  25. 50
  26. 236
  27. 14
  28. red
  29. #00ffff
  30. 25
  31. red
  32. red
  33. black
  34. magenta
  35. bright green
  36. green
  37. red
  38. green
  39. white
  40. 136

Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids