← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 99 · 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.🌈 In #002500 the green part is the hex number 25. What is it as a normal number?
  2. 2.🌈 Which colour is #ff0000? (a) magenta (b) red (c) cyan (d) bright green
  3. 3.🌈 Which hex code is yellow? (a) #ff0000 (b) #00ff00 (c) #ffff00 (d) #0000ff
  4. 4.🌈 In #490000 the red part is the hex number 49. What is it as a normal number?
  5. 5.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) white (d) green
  6. 6.🌈 Which colour is #ffff00? (a) magenta (b) yellow (c) cyan (d) black
  7. 7.🌈 Which colour of light is strongest in rgb(190, 94, 118)? (a) blue (b) green (c) red
  8. 8.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) yellow (c) black (d) white
  9. 9.🌈 Which colour is rgb(255, 0, 0)? (a) magenta (b) bright green (c) red (d) blue
  10. 10.🌈 In #0000c7 the blue part is the hex number c7. What is it as a normal number?
  11. 11.🌈 Which colour is #ff00ff? (a) cyan (b) magenta (c) bright green (d) black
  12. 12.🌈 Which colour is #ffffff? (a) bright green (b) white (c) red (d) cyan
  13. 13.🌈 Which hex code is black? (a) #000000 (b) #ffffff (c) #ff0000 (d) #00ffff
  14. 14.🌈 Which colour of light is strongest in rgb(252, 52, 89)? (a) red (b) green (c) blue
  15. 15.🌈 In #560000 the red part is the hex number 56. What is it as a normal number?
  16. 16.🌈 Which colour of light is strongest in rgb(82, 16, 163)? (a) blue (b) green (c) red
  17. 17.🌈 In #0000eb the blue part is the hex number eb. What is it as a normal number?
  18. 18.🌈 Which colour of light is strongest in rgb(5, 41, 154)? (a) red (b) blue (c) green
  19. 19.🌈 Which hex code is bright green? (a) #000000 (b) #ffff00 (c) #00ff00 (d) #ffffff
  20. 20.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) G (d) F
  21. 21.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) bright green (c) cyan (d) white
  22. 22.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) red (d) green
  23. 23.🌈 In #510000 the red part is the hex number 51. What is it as a normal number?
  24. 24.🌈 Which colour is #00ffff? (a) red (b) bright green (c) white (d) cyan
  25. 25.🌈 Which colour of light is strongest in rgb(43, 153, 61)? (a) red (b) blue (c) green
  26. 26.🌈 Which hex code is cyan? (a) #00ffff (b) #ff0000 (c) #000000 (d) #0000ff
  27. 27.🌈 Which colour of light is strongest in rgb(252, 132, 16)? (a) green (b) red (c) blue
  28. 28.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 255 (c) 100 (d) 99
  29. 29.🌈 In #006b00 the green part is the hex number 6b. What is it as a normal number?
  30. 30.🌈 Which hex code is magenta? (a) #000000 (b) #ff00ff (c) #ff0000 (d) #00ffff
  31. 31.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 3 (d) 6
  32. 32.🌈 In #0f0000 the red part is the hex number 0f. What is it as a normal number?
  33. 33.🌈 Which hex code is white? (a) #ff0000 (b) #0000ff (c) #000000 (d) #ffffff
  34. 34.🌈 Which colour of light is strongest in rgb(197, 122, 135)? (a) green (b) red (c) blue
  35. 35.🌈 Which colour of light is strongest in rgb(0, 208, 69)? (a) green (b) red (c) blue
  36. 36.🌈 In #000065 the blue part is the hex number 65. What is it as a normal number?
  37. 37.🌈 Which colour is #0000ff? (a) bright green (b) magenta (c) yellow (d) blue
  38. 38.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) black (c) cyan (d) bright green
  39. 39.🌈 In #000061 the blue part is the hex number 61. What is it as a normal number?
  40. 40.🌈 Which colour of light is strongest in rgb(134, 76, 220)? (a) red (b) green (c) blue

Answer key

  1. 37
  2. red
  3. #ffff00
  4. 73
  5. blue
  6. yellow
  7. red
  8. black
  9. red
  10. 199
  11. magenta
  12. white
  13. #000000
  14. red
  15. 86
  16. blue
  17. 235
  18. blue
  19. #00ff00
  20. F
  21. white
  22. red
  23. 81
  24. cyan
  25. green
  26. #00ffff
  27. red
  28. 255
  29. 107
  30. #ff00ff
  31. 3
  32. 15
  33. #ffffff
  34. red
  35. green
  36. 101
  37. blue
  38. bright green
  39. 97
  40. blue

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