← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 159 · 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 rgb(0, 0, 0)? (a) yellow (b) bright green (c) black (d) blue
  2. 2.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 1000 (d) 255
  3. 3.🌈 Which colour is rgb(0, 0, 255)? (a) cyan (b) blue (c) white (d) magenta
  4. 4.🌈 In #fa0000 the red part is the hex number fa. What is it as a normal number?
  5. 5.🌈 Which hex code is white? (a) #ffffff (b) #ff0000 (c) #00ff00 (d) #ffff00
  6. 6.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) red (c) white (d) cyan
  7. 7.🌈 Which hex code is red? (a) #00ff00 (b) #ff00ff (c) #ff0000 (d) #00ffff
  8. 8.🌈 In #004700 the green part is the hex number 47. What is it as a normal number?
  9. 9.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) white (d) red
  10. 10.🌈 Which colour of light is strongest in rgb(53, 117, 197)? (a) red (b) green (c) blue
  11. 11.🌈 Which colour is rgb(0, 255, 0)? (a) magenta (b) bright green (c) yellow (d) red
  12. 12.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) red (c) cyan (d) magenta
  13. 13.🌈 Which hex code is magenta? (a) #ff00ff (b) #00ffff (c) #ff0000 (d) #ffffff
  14. 14.🌈 Which colour is #00ffff? (a) black (b) bright green (c) white (d) cyan
  15. 15.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) J (c) Z (d) F
  16. 16.🌈 Which colour is rgb(255, 0, 0)? (a) magenta (b) white (c) red (d) black
  17. 17.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) red (d) black
  18. 18.🌈 Which colour is #ffff00? (a) bright green (b) white (c) magenta (d) yellow
  19. 19.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 2 (d) 6
  20. 20.🌈 Which colour of light is strongest in rgb(16, 244, 33)? (a) green (b) blue (c) red
  21. 21.🌈 Which colour of light is strongest in rgb(140, 208, 38)? (a) red (b) blue (c) green
  22. 22.🌈 Which colour is #ff0000? (a) blue (b) red (c) cyan (d) magenta
  23. 23.🌈 Which colour is #00ff00? (a) bright green (b) white (c) blue (d) cyan
  24. 24.🌈 Which hex code is bright green? (a) #0000ff (b) #000000 (c) #00ffff (d) #00ff00
  25. 25.🌈 In #3a0000 the red part is the hex number 3a. What is it as a normal number?
  26. 26.🌈 Which colour is #0000ff? (a) black (b) bright green (c) white (d) blue
  27. 27.🌈 Which colour of light is strongest in rgb(189, 126, 85)? (a) green (b) red (c) blue
  28. 28.🌈 Which colour is #ffffff? (a) white (b) red (c) bright green (d) cyan
  29. 29.🌈 In #004c00 the green part is the hex number 4c. What is it as a normal number?
  30. 30.🌈 Which colour of light is strongest in rgb(53, 202, 54)? (a) green (b) blue (c) red
  31. 31.🌈 In #00a700 the green part is the hex number a7. What is it as a normal number?
  32. 32.🌈 Which colour of light is strongest in rgb(211, 101, 84)? (a) green (b) red (c) blue
  33. 33.🌈 Which colour of light is strongest in rgb(118, 178, 14)? (a) red (b) green (c) blue
  34. 34.🌈 Which colour of light is strongest in rgb(81, 83, 174)? (a) green (b) blue (c) red
  35. 35.🌈 In #00b800 the green part is the hex number b8. What is it as a normal number?
  36. 36.🌈 In #00fa00 the green part is the hex number fa. What is it as a normal number?
  37. 37.🌈 Which colour of light is strongest in rgb(166, 102, 120)? (a) green (b) blue (c) red
  38. 38.🌈 In #00005e the blue part is the hex number 5e. What is it as a normal number?
  39. 39.🌈 Which colour of light is strongest in rgb(138, 196, 105)? (a) blue (b) red (c) green
  40. 40.🌈 Which colour of light is strongest in rgb(13, 246, 54)? (a) blue (b) red (c) green

Answer key

  1. black
  2. 255
  3. blue
  4. 250
  5. #ffffff
  6. white
  7. #ff0000
  8. 71
  9. blue
  10. blue
  11. bright green
  12. cyan
  13. #ff00ff
  14. cyan
  15. F
  16. red
  17. red
  18. yellow
  19. 3
  20. green
  21. green
  22. red
  23. bright green
  24. #00ff00
  25. 58
  26. blue
  27. red
  28. white
  29. 76
  30. green
  31. 167
  32. red
  33. green
  34. blue
  35. 184
  36. 250
  37. red
  38. 94
  39. green
  40. green

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