← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 140 · 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(66, 140, 239)? (a) green (b) blue (c) red
  2. 2.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) red (d) white
  3. 3.🌈 Which hex code is magenta? (a) #00ffff (b) #00ff00 (c) #ff0000 (d) #ff00ff
  4. 4.🌈 Which hex code is bright green? (a) #ff0000 (b) #00ff00 (c) #0000ff (d) #ffff00
  5. 5.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) blue (d) green
  6. 6.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) Z (c) J (d) G
  7. 7.🌈 Which hex code is white? (a) #ff0000 (b) #00ff00 (c) #ffffff (d) #0000ff
  8. 8.🌈 Which colour is #00ff00? (a) white (b) red (c) bright green (d) black
  9. 9.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) white (c) black (d) cyan
  10. 10.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) cyan (c) black (d) red
  11. 11.🌈 Which colour of light is strongest in rgb(168, 105, 83)? (a) green (b) red (c) blue
  12. 12.🌈 Which colour is #00ffff? (a) cyan (b) yellow (c) black (d) white
  13. 13.🌈 Which colour of light is strongest in rgb(244, 15, 36)? (a) red (b) blue (c) green
  14. 14.🌈 In #005800 the green part is the hex number 58. What is it as a normal number?
  15. 15.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) magenta (c) blue (d) bright green
  16. 16.🌈 In #000048 the blue part is the hex number 48. What is it as a normal number?
  17. 17.🌈 In #6a0000 the red part is the hex number 6a. What is it as a normal number?
  18. 18.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) yellow (c) blue (d) white
  19. 19.🌈 Which colour of light is strongest in rgb(79, 157, 48)? (a) blue (b) green (c) red
  20. 20.🌈 Which colour of light is strongest in rgb(192, 25, 61)? (a) green (b) blue (c) red
  21. 21.🌈 In #00d200 the green part is the hex number d2. What is it as a normal number?
  22. 22.🌈 Which hex code is black? (a) #ff0000 (b) #ffff00 (c) #0000ff (d) #000000
  23. 23.🌈 In #190000 the red part is the hex number 19. What is it as a normal number?
  24. 24.🌈 Which colour of light is strongest in rgb(233, 68, 33)? (a) blue (b) red (c) green
  25. 25.🌈 Which colour of light is strongest in rgb(127, 35, 228)? (a) green (b) red (c) blue
  26. 26.🌈 In #9f0000 the red part is the hex number 9f. What is it as a normal number?
  27. 27.🌈 In #600000 the red part is the hex number 60. What is it as a normal number?
  28. 28.🌈 In #00ef00 the green part is the hex number ef. What is it as a normal number?
  29. 29.🌈 Which colour of light is strongest in rgb(54, 94, 168)? (a) green (b) red (c) blue
  30. 30.🌈 Which colour of light is strongest in rgb(89, 249, 36)? (a) green (b) red (c) blue
  31. 31.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 4 (d) 2
  32. 32.🌈 Which hex code is yellow? (a) #ffffff (b) #ffff00 (c) #00ff00 (d) #ff00ff
  33. 33.🌈 In #00d600 the green part is the hex number d6. What is it as a normal number?
  34. 34.🌈 Which colour of light is strongest in rgb(12, 164, 44)? (a) green (b) red (c) blue
  35. 35.🌈 Which colour of light is strongest in rgb(180, 138, 91)? (a) blue (b) red (c) green
  36. 36.🌈 In #f10000 the red part is the hex number f1. What is it as a normal number?
  37. 37.🌈 Which colour is #000000? (a) black (b) red (c) cyan (d) blue
  38. 38.🌈 Which colour is #ffffff? (a) white (b) cyan (c) yellow (d) red
  39. 39.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 255 (d) 99
  40. 40.🌈 Which hex code is red? (a) #ff0000 (b) #00ffff (c) #0000ff (d) #ff00ff

Answer key

  1. blue
  2. blue
  3. #ff00ff
  4. #00ff00
  5. red
  6. F
  7. #ffffff
  8. bright green
  9. white
  10. cyan
  11. red
  12. cyan
  13. red
  14. 88
  15. bright green
  16. 72
  17. 106
  18. red
  19. green
  20. red
  21. 210
  22. #000000
  23. 25
  24. red
  25. blue
  26. 159
  27. 96
  28. 239
  29. blue
  30. green
  31. 3
  32. #ffff00
  33. 214
  34. green
  35. red
  36. 241
  37. black
  38. white
  39. 255
  40. #ff0000

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