← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 6 · 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.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 100 (d) 1000
  2. 2.🌈 In #00006d the blue part is the hex number 6d. What is it as a normal number?
  3. 3.🌈 Which colour is #ff00ff? (a) cyan (b) bright green (c) magenta (d) yellow
  4. 4.🌈 Which hex code is red? (a) #ff0000 (b) #000000 (c) #ffffff (d) #00ffff
  5. 5.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) magenta (c) white (d) bright green
  6. 6.🌈 In #009800 the green part is the hex number 98. What is it as a normal number?
  7. 7.🌈 Which hex code is bright green? (a) #00ff00 (b) #ffffff (c) #ffff00 (d) #00ffff
  8. 8.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) blue (d) red
  9. 9.🌈 Which colour of light is strongest in rgb(208, 23, 20)? (a) red (b) blue (c) green
  10. 10.🌈 Which hex code is black? (a) #ff00ff (b) #0000ff (c) #000000 (d) #ff0000
  11. 11.🌈 Which hex code is blue? (a) #ff0000 (b) #ffffff (c) #0000ff (d) #00ff00
  12. 12.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) blue (c) red (d) white
  13. 13.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) black (c) cyan (d) red
  14. 14.🌈 Which colour is #00ff00? (a) black (b) bright green (c) red (d) white
  15. 15.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) magenta (c) yellow (d) white
  16. 16.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) J (d) F
  17. 17.🌈 Which colour is #ffffff? (a) cyan (b) bright green (c) white (d) red
  18. 18.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) blue (d) red
  19. 19.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) red (c) magenta (d) bright green
  20. 20.🌈 Which colour of light is strongest in rgb(210, 117, 13)? (a) red (b) green (c) blue
  21. 21.🌈 Which colour of light is strongest in rgb(8, 199, 111)? (a) red (b) green (c) blue
  22. 22.🌈 Which colour is #00ffff? (a) bright green (b) cyan (c) magenta (d) white
  23. 23.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) white (c) bright green (d) red
  24. 24.🌈 Which colour of light is strongest in rgb(210, 77, 41)? (a) green (b) blue (c) red
  25. 25.🌈 Which colour of light is strongest in rgb(49, 89, 164)? (a) green (b) red (c) blue
  26. 26.🌈 In #cd0000 the red part is the hex number cd. What is it as a normal number?
  27. 27.🌈 In #ab0000 the red part is the hex number ab. What is it as a normal number?
  28. 28.🌈 Which hex code is yellow? (a) #ff0000 (b) #00ff00 (c) #ffff00 (d) #ff00ff
  29. 29.🌈 In #00004e the blue part is the hex number 4e. What is it as a normal number?
  30. 30.🌈 In #004b00 the green part is the hex number 4b. What is it as a normal number?
  31. 31.🌈 In #00cb00 the green part is the hex number cb. What is it as a normal number?
  32. 32.🌈 In #00db00 the green part is the hex number db. What is it as a normal number?
  33. 33.🌈 Which colour is #ff0000? (a) red (b) yellow (c) black (d) white
  34. 34.🌈 Which colour of light is strongest in rgb(165, 4, 49)? (a) blue (b) red (c) green
  35. 35.🌈 Which colour of light is strongest in rgb(104, 45, 197)? (a) green (b) blue (c) red
  36. 36.🌈 Which colour of light is strongest in rgb(173, 3, 136)? (a) green (b) red (c) blue
  37. 37.🌈 In #00ed00 the green part is the hex number ed. What is it as a normal number?
  38. 38.🌈 Which colour is #000000? (a) blue (b) cyan (c) magenta (d) black
  39. 39.🌈 Which colour of light is strongest in rgb(46, 249, 38)? (a) blue (b) green (c) red
  40. 40.🌈 Which colour of light is strongest in rgb(46, 170, 35)? (a) red (b) blue (c) green

Answer key

  1. 255
  2. 109
  3. magenta
  4. #ff0000
  5. black
  6. 152
  7. #00ff00
  8. red
  9. red
  10. #000000
  11. #0000ff
  12. white
  13. cyan
  14. bright green
  15. yellow
  16. F
  17. white
  18. blue
  19. red
  20. red
  21. green
  22. cyan
  23. bright green
  24. red
  25. blue
  26. 205
  27. 171
  28. #ffff00
  29. 78
  30. 75
  31. 203
  32. 219
  33. red
  34. red
  35. blue
  36. red
  37. 237
  38. black
  39. green
  40. green

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