← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 262 · 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 is rgb(255, 0, 255)? (a) yellow (b) red (c) blue (d) magenta
  2. 2.🌈 In #002a00 the green part is the hex number 2a. What is it as a normal number?
  3. 3.🌈 Which hex code is white? (a) #00ff00 (b) #0000ff (c) #ffffff (d) #ffff00
  4. 4.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) green (d) blue
  5. 5.🌈 Which colour of light is strongest in rgb(49, 247, 119)? (a) red (b) blue (c) green
  6. 6.🌈 Which colour of light is strongest in rgb(139, 89, 226)? (a) blue (b) red (c) green
  7. 7.🌈 Which hex code is black? (a) #ffffff (b) #0000ff (c) #000000 (d) #00ffff
  8. 8.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 99 (d) 255
  9. 9.🌈 Which hex code is red? (a) #00ff00 (b) #ffff00 (c) #ff0000 (d) #00ffff
  10. 10.🌈 Which colour is #ff00ff? (a) red (b) magenta (c) cyan (d) blue
  11. 11.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 2 (d) 3
  12. 12.🌈 Which colour of light is strongest in rgb(126, 13, 174)? (a) blue (b) green (c) red
  13. 13.🌈 Which hex code is blue? (a) #ff00ff (b) #ffffff (c) #0000ff (d) #ffff00
  14. 14.🌈 In #0000ef the blue part is the hex number ef. What is it as a normal number?
  15. 15.🌈 Which colour of light is strongest in rgb(48, 15, 222)? (a) red (b) green (c) blue
  16. 16.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) cyan (c) red (d) blue
  17. 17.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) green (d) red
  18. 18.🌈 In #00df00 the green part is the hex number df. What is it as a normal number?
  19. 19.🌈 Which hex code is bright green? (a) #000000 (b) #00ff00 (c) #ff00ff (d) #00ffff
  20. 20.🌈 Which colour of light is strongest in rgb(84, 21, 185)? (a) blue (b) red (c) green
  21. 21.🌈 Which colour is #00ffff? (a) cyan (b) magenta (c) red (d) blue
  22. 22.🌈 Which colour is #ffff00? (a) cyan (b) yellow (c) white (d) black
  23. 23.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) blue (c) yellow (d) red
  24. 24.🌈 Which colour is #ff0000? (a) bright green (b) yellow (c) cyan (d) red
  25. 25.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) yellow (c) red (d) cyan
  26. 26.🌈 In #690000 the red part is the hex number 69. What is it as a normal number?
  27. 27.🌈 Which colour is #0000ff? (a) magenta (b) white (c) blue (d) red
  28. 28.🌈 In #4e0000 the red part is the hex number 4e. What is it as a normal number?
  29. 29.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) F (c) G (d) J
  30. 30.🌈 Which colour of light is strongest in rgb(89, 196, 23)? (a) blue (b) red (c) green
  31. 31.🌈 In #006800 the green part is the hex number 68. What is it as a normal number?
  32. 32.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) red (c) black (d) white
  33. 33.🌈 Which colour is #000000? (a) white (b) red (c) black (d) cyan
  34. 34.🌈 In #170000 the red part is the hex number 17. What is it as a normal number?
  35. 35.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) magenta (c) white (d) red
  36. 36.🌈 Which colour of light is strongest in rgb(103, 179, 41)? (a) red (b) green (c) blue
  37. 37.🌈 Which hex code is cyan? (a) #ff0000 (b) #00ffff (c) #ff00ff (d) #0000ff
  38. 38.🌈 Which colour of light is strongest in rgb(34, 105, 210)? (a) red (b) green (c) blue
  39. 39.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) magenta (c) cyan (d) black
  40. 40.🌈 Which colour of light is strongest in rgb(63, 221, 8)? (a) green (b) red (c) blue

Answer key

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

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