← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 43 · 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 of light is strongest in rgb(25, 58, 235)? (a) blue (b) green (c) red
  2. 2.🌈 Which colour is #00ffff? (a) blue (b) red (c) yellow (d) cyan
  3. 3.🌈 Which colour is rgb(255, 0, 0)? (a) white (b) cyan (c) magenta (d) red
  4. 4.🌈 Which colour of light is strongest in rgb(61, 171, 47)? (a) green (b) red (c) blue
  5. 5.🌈 In #000073 the blue part is the hex number 73. What is it as a normal number?
  6. 6.🌈 Which hex code is yellow? (a) #ff00ff (b) #000000 (c) #0000ff (d) #ffff00
  7. 7.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 99 (c) 255 (d) 100
  8. 8.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) F (d) Z
  9. 9.🌈 Which colour is #0000ff? (a) white (b) yellow (c) bright green (d) blue
  10. 10.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 2 (d) 3
  11. 11.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) red (d) blue
  12. 12.🌈 Which colour is #00ff00? (a) blue (b) bright green (c) white (d) yellow
  13. 13.🌈 Which colour is rgb(0, 255, 0)? (a) cyan (b) white (c) bright green (d) black
  14. 14.🌈 Which colour of light is strongest in rgb(203, 129, 63)? (a) red (b) green (c) blue
  15. 15.🌈 Which colour of light is strongest in rgb(139, 172, 49)? (a) red (b) blue (c) green
  16. 16.🌈 Which colour of light is strongest in rgb(29, 30, 199)? (a) green (b) red (c) blue
  17. 17.🌈 In #220000 the red part is the hex number 22. What is it as a normal number?
  18. 18.🌈 In #d80000 the red part is the hex number d8. What is it as a normal number?
  19. 19.🌈 Which colour of light is strongest in rgb(253, 79, 95)? (a) green (b) red (c) blue
  20. 20.🌈 Which hex code is white? (a) #ffffff (b) #00ff00 (c) #000000 (d) #0000ff
  21. 21.🌈 Which hex code is black? (a) #00ffff (b) #0000ff (c) #000000 (d) #00ff00
  22. 22.🌈 Which colour of light is strongest in rgb(19, 191, 36)? (a) green (b) blue (c) red
  23. 23.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) black (c) blue (d) green
  24. 24.🌈 In #c80000 the red part is the hex number c8. What is it as a normal number?
  25. 25.🌈 Which hex code is red? (a) #00ff00 (b) #000000 (c) #ff0000 (d) #ffffff
  26. 26.🌈 Which colour is #ffffff? (a) magenta (b) cyan (c) red (d) white
  27. 27.🌈 In #b30000 the red part is the hex number b3. What is it as a normal number?
  28. 28.🌈 Which colour is rgb(0, 0, 0)? (a) magenta (b) bright green (c) black (d) yellow
  29. 29.🌈 Which colour of light is strongest in rgb(79, 243, 62)? (a) green (b) red (c) blue
  30. 30.🌈 Which colour is #ff0000? (a) cyan (b) bright green (c) yellow (d) red
  31. 31.🌈 Which colour is rgb(255, 255, 0)? (a) cyan (b) bright green (c) blue (d) yellow
  32. 32.🌈 Which colour is #000000? (a) white (b) black (c) yellow (d) magenta
  33. 33.🌈 In #00e300 the green part is the hex number e3. What is it as a normal number?
  34. 34.🌈 In #810000 the red part is the hex number 81. What is it as a normal number?
  35. 35.🌈 Which hex code is cyan? (a) #00ffff (b) #ff00ff (c) #000000 (d) #0000ff
  36. 36.🌈 Which colour of light is strongest in rgb(85, 95, 153)? (a) green (b) red (c) blue
  37. 37.🌈 Which colour is #ffff00? (a) cyan (b) magenta (c) blue (d) yellow
  38. 38.🌈 Which colour of light is strongest in rgb(31, 55, 191)? (a) red (b) green (c) blue
  39. 39.🌈 Which colour of light is strongest in rgb(127, 59, 223)? (a) blue (b) red (c) green
  40. 40.🌈 Which colour of light is strongest in rgb(152, 111, 116)? (a) green (b) blue (c) red

Answer key

  1. blue
  2. cyan
  3. red
  4. green
  5. 115
  6. #ffff00
  7. 255
  8. F
  9. blue
  10. 3
  11. blue
  12. bright green
  13. bright green
  14. red
  15. green
  16. blue
  17. 34
  18. 216
  19. red
  20. #ffffff
  21. #000000
  22. green
  23. red
  24. 200
  25. #ff0000
  26. white
  27. 179
  28. black
  29. green
  30. red
  31. yellow
  32. black
  33. 227
  34. 129
  35. #00ffff
  36. blue
  37. yellow
  38. blue
  39. blue
  40. red

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