← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 268 · 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 #380000 the red part is the hex number 38. What is it as a normal number?
  2. 2.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) black (c) cyan (d) magenta
  3. 3.🌈 Which colour is rgb(0, 0, 255)? (a) white (b) cyan (c) red (d) blue
  4. 4.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) black (c) bright green (d) yellow
  5. 5.🌈 Which hex code is magenta? (a) #00ff00 (b) #0000ff (c) #ff00ff (d) #ffffff
  6. 6.🌈 Which colour of light is strongest in rgb(242, 32, 22)? (a) green (b) red (c) blue
  7. 7.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 99 (c) 255 (d) 100
  8. 8.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) white (c) red (d) cyan
  9. 9.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) red (c) black (d) white
  10. 10.🌈 Which hex code is red? (a) #ff0000 (b) #00ffff (c) #0000ff (d) #ff00ff
  11. 11.🌈 Which colour of light is strongest in rgb(247, 54, 37)? (a) green (b) blue (c) red
  12. 12.🌈 Which colour of light is strongest in rgb(65, 241, 63)? (a) red (b) blue (c) green
  13. 13.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) F (c) Z (d) J
  14. 14.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) red (d) white
  15. 15.🌈 In #007a00 the green part is the hex number 7a. What is it as a normal number?
  16. 16.🌈 Which colour is #0000ff? (a) bright green (b) yellow (c) cyan (d) blue
  17. 17.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 2 (d) 6
  18. 18.🌈 In #0000f3 the blue part is the hex number f3. What is it as a normal number?
  19. 19.🌈 In #f30000 the red part is the hex number f3. What is it as a normal number?
  20. 20.🌈 Which colour is #00ffff? (a) cyan (b) white (c) magenta (d) yellow
  21. 21.🌈 Which colour is #00ff00? (a) magenta (b) white (c) bright green (d) blue
  22. 22.🌈 Which colour of light is strongest in rgb(209, 27, 38)? (a) blue (b) red (c) green
  23. 23.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) cyan (c) bright green (d) magenta
  24. 24.🌈 In #4b0000 the red part is the hex number 4b. What is it as a normal number?
  25. 25.🌈 Which hex code is bright green? (a) #00ff00 (b) #ff00ff (c) #ffffff (d) #0000ff
  26. 26.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
  27. 27.🌈 Which colour of light is strongest in rgb(55, 106, 226)? (a) blue (b) green (c) red
  28. 28.🌈 Which hex code is blue? (a) #ffff00 (b) #0000ff (c) #ffffff (d) #ff00ff
  29. 29.🌈 Which colour is #000000? (a) red (b) black (c) bright green (d) yellow
  30. 30.🌈 Which colour of light is strongest in rgb(161, 10, 76)? (a) green (b) blue (c) red
  31. 31.🌈 Which colour of light is strongest in rgb(173, 122, 110)? (a) red (b) green (c) blue
  32. 32.🌈 In #000097 the blue part is the hex number 97. What is it as a normal number?
  33. 33.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) white (c) bright green (d) magenta
  34. 34.🌈 Which hex code is white? (a) #00ff00 (b) #ff0000 (c) #000000 (d) #ffffff
  35. 35.🌈 Which colour of light is strongest in rgb(231, 27, 104)? (a) green (b) red (c) blue
  36. 36.🌈 In #0b0000 the red part is the hex number 0b. What is it as a normal number?
  37. 37.🌈 Which colour is #ff0000? (a) blue (b) cyan (c) red (d) white
  38. 38.🌈 In #002600 the green part is the hex number 26. What is it as a normal number?
  39. 39.🌈 Which hex code is cyan? (a) #ff0000 (b) #0000ff (c) #000000 (d) #00ffff
  40. 40.🌈 Which colour of light is strongest in rgb(77, 254, 10)? (a) red (b) blue (c) green

Answer key

  1. 56
  2. black
  3. blue
  4. bright green
  5. #ff00ff
  6. red
  7. 255
  8. cyan
  9. white
  10. #ff0000
  11. red
  12. green
  13. F
  14. blue
  15. 122
  16. blue
  17. 3
  18. 243
  19. 243
  20. cyan
  21. bright green
  22. red
  23. magenta
  24. 75
  25. #00ff00
  26. red
  27. blue
  28. #0000ff
  29. black
  30. red
  31. red
  32. 151
  33. red
  34. #ffffff
  35. red
  36. 11
  37. red
  38. 38
  39. #00ffff
  40. green

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