← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 288 · 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, 0)? (a) yellow (b) black (c) red (d) blue
  2. 2.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) blue (c) white (d) bright green
  3. 3.🌈 Which hex code is black? (a) #ffff00 (b) #ff0000 (c) #000000 (d) #00ffff
  4. 4.🌈 Which hex code is bright green? (a) #ffffff (b) #000000 (c) #00ff00 (d) #ff0000
  5. 5.🌈 Which colour is #ff00ff? (a) yellow (b) red (c) magenta (d) blue
  6. 6.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 99 (c) 1000 (d) 100
  7. 7.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) white (d) green
  8. 8.🌈 In #de0000 the red part is the hex number de. What is it as a normal number?
  9. 9.🌈 Which colour is rgb(255, 0, 255)? (a) red (b) white (c) magenta (d) bright green
  10. 10.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) red (d) green
  11. 11.🌈 Which colour of light is strongest in rgb(77, 23, 202)? (a) red (b) green (c) blue
  12. 12.🌈 Which colour is #00ffff? (a) red (b) bright green (c) yellow (d) cyan
  13. 13.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 2 (c) 3 (d) 4
  14. 14.🌈 Which colour is #ffff00? (a) magenta (b) red (c) yellow (d) white
  15. 15.🌈 Which colour of light is strongest in rgb(122, 50, 236)? (a) red (b) green (c) blue
  16. 16.🌈 Which colour is #0000ff? (a) white (b) magenta (c) blue (d) yellow
  17. 17.🌈 Which colour of light is strongest in rgb(13, 117, 155)? (a) blue (b) red (c) green
  18. 18.🌈 Which colour is #ff0000? (a) magenta (b) white (c) red (d) bright green
  19. 19.🌈 Which colour is #000000? (a) yellow (b) bright green (c) black (d) white
  20. 20.🌈 Which colour of light is strongest in rgb(120, 172, 111)? (a) green (b) blue (c) red
  21. 21.🌈 In #510000 the red part is the hex number 51. What is it as a normal number?
  22. 22.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) black (c) white (d) cyan
  23. 23.🌈 Which hex code is cyan? (a) #ff00ff (b) #00ffff (c) #00ff00 (d) #ff0000
  24. 24.🌈 Which colour of light is strongest in rgb(8, 155, 6)? (a) green (b) red (c) blue
  25. 25.🌈 In #00004f the blue part is the hex number 4f. What is it as a normal number?
  26. 26.🌈 Which colour of light is strongest in rgb(11, 241, 19)? (a) blue (b) green (c) red
  27. 27.🌈 Which hex code is white? (a) #ff0000 (b) #000000 (c) #00ffff (d) #ffffff
  28. 28.🌈 Which colour is #ffffff? (a) magenta (b) red (c) bright green (d) white
  29. 29.🌈 In #fb0000 the red part is the hex number fb. What is it as a normal number?
  30. 30.🌈 Which colour of light is strongest in rgb(54, 221, 19)? (a) green (b) red (c) blue
  31. 31.🌈 In #003900 the green part is the hex number 39. What is it as a normal number?
  32. 32.🌈 Which hex code is blue? (a) #00ffff (b) #0000ff (c) #ff0000 (d) #00ff00
  33. 33.🌈 Which colour is #00ff00? (a) bright green (b) white (c) blue (d) yellow
  34. 34.🌈 Which colour of light is strongest in rgb(84, 184, 104)? (a) red (b) blue (c) green
  35. 35.🌈 Which colour of light is strongest in rgb(203, 69, 30)? (a) green (b) red (c) blue
  36. 36.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) G (d) Z
  37. 37.🌈 Which colour of light is strongest in rgb(43, 174, 84)? (a) green (b) red (c) blue
  38. 38.🌈 Which colour of light is strongest in rgb(191, 45, 125)? (a) green (b) blue (c) red
  39. 39.🌈 Which hex code is magenta? (a) #00ffff (b) #00ff00 (c) #ff00ff (d) #ffff00
  40. 40.🌈 Which hex code is red? (a) #ffffff (b) #00ff00 (c) #ffff00 (d) #ff0000

Answer key

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

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