← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 33 · 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) J (b) Z (c) G (d) F
  2. 2.🌈 Which colour is #ffff00? (a) black (b) red (c) bright green (d) yellow
  3. 3.🌈 Which colour is rgb(255, 0, 255)? (a) cyan (b) blue (c) magenta (d) bright green
  4. 4.🌈 In #0c0000 the red part is the hex number 0c. What is it as a normal number?
  5. 5.🌈 Which colour of light is strongest in rgb(250, 139, 5)? (a) blue (b) green (c) red
  6. 6.🌈 Which colour is #ff0000? (a) yellow (b) red (c) blue (d) white
  7. 7.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) white (c) cyan (d) bright green
  8. 8.🌈 Which colour of light is strongest in rgb(240, 28, 102)? (a) red (b) green (c) blue
  9. 9.🌈 In #002100 the green part is the hex number 21. What is it as a normal number?
  10. 10.🌈 Which colour is #00ff00? (a) yellow (b) bright green (c) white (d) magenta
  11. 11.🌈 In #890000 the red part is the hex number 89. What is it as a normal number?
  12. 12.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) red (d) white
  13. 13.🌈 Which colour is #00ffff? (a) yellow (b) magenta (c) cyan (d) red
  14. 14.🌈 Which hex code is red? (a) #00ff00 (b) #0000ff (c) #ff0000 (d) #000000
  15. 15.🌈 Which colour is rgb(255, 0, 0)? (a) magenta (b) cyan (c) red (d) bright green
  16. 16.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 4 (d) 6
  17. 17.🌈 Which colour of light is strongest in rgb(104, 229, 43)? (a) blue (b) red (c) green
  18. 18.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 1000 (c) 255 (d) 100
  19. 19.🌈 Which hex code is white? (a) #ffff00 (b) #00ffff (c) #000000 (d) #ffffff
  20. 20.🌈 In #0000e7 the blue part is the hex number e7. What is it as a normal number?
  21. 21.🌈 Which colour of light is strongest in rgb(8, 156, 95)? (a) red (b) blue (c) green
  22. 22.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) green (c) blue (d) black
  23. 23.🌈 Which colour is #ff00ff? (a) white (b) cyan (c) bright green (d) magenta
  24. 24.🌈 In #9c0000 the red part is the hex number 9c. What is it as a normal number?
  25. 25.🌈 In #006000 the green part is the hex number 60. What is it as a normal number?
  26. 26.🌈 Which colour of light is strongest in rgb(29, 150, 42)? (a) red (b) blue (c) green
  27. 27.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) bright green (c) yellow (d) cyan
  28. 28.🌈 Which hex code is yellow? (a) #ffffff (b) #00ffff (c) #00ff00 (d) #ffff00
  29. 29.🌈 In #003000 the green part is the hex number 30. What is it as a normal number?
  30. 30.🌈 In #000025 the blue part is the hex number 25. What is it as a normal number?
  31. 31.🌈 In #006900 the green part is the hex number 69. What is it as a normal number?
  32. 32.🌈 Which colour of light is strongest in rgb(30, 169, 56)? (a) blue (b) green (c) red
  33. 33.🌈 Which colour is #000000? (a) magenta (b) cyan (c) black (d) bright green
  34. 34.🌈 In #004300 the green part is the hex number 43. What is it as a normal number?
  35. 35.🌈 Which colour is #0000ff? (a) red (b) cyan (c) blue (d) black
  36. 36.🌈 Which hex code is black? (a) #ffff00 (b) #000000 (c) #ff00ff (d) #00ff00
  37. 37.🌈 Which colour of light is strongest in rgb(82, 17, 152)? (a) red (b) green (c) blue
  38. 38.🌈 In #da0000 the red part is the hex number da. What is it as a normal number?
  39. 39.🌈 Which colour of light is strongest in rgb(90, 130, 167)? (a) red (b) blue (c) green
  40. 40.🌈 In #530000 the red part is the hex number 53. What is it as a normal number?

Answer key

  1. F
  2. yellow
  3. magenta
  4. 12
  5. red
  6. red
  7. white
  8. red
  9. 33
  10. bright green
  11. 137
  12. blue
  13. cyan
  14. #ff0000
  15. red
  16. 3
  17. green
  18. 255
  19. #ffffff
  20. 231
  21. green
  22. red
  23. magenta
  24. 156
  25. 96
  26. green
  27. bright green
  28. #ffff00
  29. 48
  30. 37
  31. 105
  32. green
  33. black
  34. 67
  35. blue
  36. #000000
  37. blue
  38. 218
  39. blue
  40. 83

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