← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 163 · 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.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) F (d) J
  2. 2.🌈 Which hex code is blue? (a) #ff0000 (b) #000000 (c) #ff00ff (d) #0000ff
  3. 3.🌈 Which colour is #00ff00? (a) magenta (b) blue (c) bright green (d) white
  4. 4.🌈 Which colour is rgb(255, 0, 0)? (a) white (b) red (c) blue (d) cyan
  5. 5.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) green (d) blue
  6. 6.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 255 (d) 1000
  7. 7.🌈 Which colour is #ff00ff? (a) red (b) yellow (c) black (d) magenta
  8. 8.🌈 In #390000 the red part is the hex number 39. What is it as a normal number?
  9. 9.🌈 In #00bd00 the green part is the hex number bd. What is it as a normal number?
  10. 10.🌈 Which hex code is yellow? (a) #ffffff (b) #00ffff (c) #ffff00 (d) #00ff00
  11. 11.🌈 In #007300 the green part is the hex number 73. What is it as a normal number?
  12. 12.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) green (d) blue
  13. 13.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) black (c) white (d) yellow
  14. 14.🌈 Which colour of light is strongest in rgb(190, 8, 103)? (a) blue (b) green (c) red
  15. 15.🌈 In #590000 the red part is the hex number 59. What is it as a normal number?
  16. 16.🌈 Which colour of light is strongest in rgb(124, 1, 245)? (a) blue (b) red (c) green
  17. 17.🌈 Which hex code is cyan? (a) #ff00ff (b) #00ffff (c) #0000ff (d) #ffffff
  18. 18.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) yellow (c) red (d) magenta
  19. 19.🌈 Which colour of light is strongest in rgb(103, 114, 222)? (a) blue (b) red (c) green
  20. 20.🌈 Which colour is #ff0000? (a) white (b) cyan (c) bright green (d) red
  21. 21.🌈 In #400000 the red part is the hex number 40. What is it as a normal number?
  22. 22.🌈 Which colour is #0000ff? (a) white (b) black (c) yellow (d) blue
  23. 23.🌈 Which colour of light is strongest in rgb(173, 10, 115)? (a) red (b) blue (c) green
  24. 24.🌈 In #280000 the red part is the hex number 28. What is it as a normal number?
  25. 25.🌈 Which colour of light is strongest in rgb(224, 54, 18)? (a) red (b) blue (c) green
  26. 26.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 6 (d) 4
  27. 27.🌈 Which hex code is black? (a) #0000ff (b) #ff00ff (c) #000000 (d) #ffffff
  28. 28.🌈 In #003500 the green part is the hex number 35. What is it as a normal number?
  29. 29.🌈 Which colour is #ffffff? (a) yellow (b) bright green (c) white (d) cyan
  30. 30.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) white (c) yellow (d) bright green
  31. 31.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) black (c) blue (d) bright green
  32. 32.🌈 Which colour of light is strongest in rgb(51, 16, 219)? (a) blue (b) green (c) red
  33. 33.🌈 Which hex code is white? (a) #ffffff (b) #000000 (c) #00ffff (d) #ffff00
  34. 34.🌈 Which colour of light is strongest in rgb(2, 208, 2)? (a) blue (b) green (c) red
  35. 35.🌈 In #00a300 the green part is the hex number a3. What is it as a normal number?
  36. 36.🌈 In #000098 the blue part is the hex number 98. What is it as a normal number?
  37. 37.🌈 In #840000 the red part is the hex number 84. What is it as a normal number?
  38. 38.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) cyan (c) yellow (d) bright green
  39. 39.🌈 In #008b00 the green part is the hex number 8b. What is it as a normal number?
  40. 40.🌈 In #003400 the green part is the hex number 34. What is it as a normal number?

Answer key

  1. F
  2. #0000ff
  3. bright green
  4. red
  5. red
  6. 255
  7. magenta
  8. 57
  9. 189
  10. #ffff00
  11. 115
  12. blue
  13. yellow
  14. red
  15. 89
  16. blue
  17. #00ffff
  18. magenta
  19. blue
  20. red
  21. 64
  22. blue
  23. red
  24. 40
  25. red
  26. 3
  27. #000000
  28. 53
  29. white
  30. white
  31. blue
  32. blue
  33. #ffffff
  34. green
  35. 163
  36. 152
  37. 132
  38. cyan
  39. 139
  40. 52

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