← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 298 · 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 #0000ff? (a) bright green (b) cyan (c) black (d) blue
  2. 2.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 99 (d) 1000
  3. 3.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) white (c) magenta (d) bright green
  4. 4.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) F (d) J
  5. 5.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) bright green (c) white (d) blue
  6. 6.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) green (d) red
  7. 7.🌈 Which hex code is cyan? (a) #0000ff (b) #ffff00 (c) #00ffff (d) #000000
  8. 8.🌈 In #00005a the blue part is the hex number 5a. What is it as a normal number?
  9. 9.🌈 Which colour of light is strongest in rgb(200, 105, 82)? (a) blue (b) red (c) green
  10. 10.🌈 Which colour of light is strongest in rgb(1, 130, 157)? (a) blue (b) green (c) red
  11. 11.🌈 Which hex code is red? (a) #ff0000 (b) #0000ff (c) #000000 (d) #ff00ff
  12. 12.🌈 Which colour is rgb(0, 255, 255)? (a) red (b) cyan (c) yellow (d) blue
  13. 13.🌈 Which colour is #000000? (a) cyan (b) magenta (c) bright green (d) black
  14. 14.🌈 Which hex code is yellow? (a) #ff00ff (b) #00ff00 (c) #0000ff (d) #ffff00
  15. 15.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) green (d) black
  16. 16.🌈 Which colour of light is strongest in rgb(67, 133, 214)? (a) blue (b) green (c) red
  17. 17.🌈 Which colour of light is strongest in rgb(179, 76, 13)? (a) green (b) blue (c) red
  18. 18.🌈 In #780000 the red part is the hex number 78. What is it as a normal number?
  19. 19.🌈 In #0000c8 the blue part is the hex number c8. What is it as a normal number?
  20. 20.🌈 In #00008b the blue part is the hex number 8b. What is it as a normal number?
  21. 21.🌈 Which colour of light is strongest in rgb(119, 207, 81)? (a) red (b) blue (c) green
  22. 22.🌈 In #002800 the green part is the hex number 28. What is it as a normal number?
  23. 23.🌈 Which hex code is white? (a) #ff0000 (b) #0000ff (c) #ff00ff (d) #ffffff
  24. 24.🌈 In #004200 the green part is the hex number 42. What is it as a normal number?
  25. 25.🌈 In #001b00 the green part is the hex number 1b. What is it as a normal number?
  26. 26.🌈 Which hex code is bright green? (a) #ffff00 (b) #000000 (c) #00ffff (d) #00ff00
  27. 27.🌈 Which colour of light is strongest in rgb(8, 116, 182)? (a) red (b) green (c) blue
  28. 28.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) black (c) bright green (d) yellow
  29. 29.🌈 Which hex code is magenta? (a) #ff00ff (b) #ffffff (c) #ff0000 (d) #000000
  30. 30.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 3 (d) 2
  31. 31.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) yellow (c) black (d) blue
  32. 32.🌈 In #001800 the green part is the hex number 18. What is it as a normal number?
  33. 33.🌈 Which colour of light is strongest in rgb(42, 48, 224)? (a) red (b) green (c) blue
  34. 34.🌈 In #000014 the blue part is the hex number 14. What is it as a normal number?
  35. 35.🌈 Which colour is #ffff00? (a) black (b) red (c) bright green (d) yellow
  36. 36.🌈 Which colour is #00ffff? (a) bright green (b) cyan (c) blue (d) red
  37. 37.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) blue (c) magenta (d) cyan
  38. 38.🌈 Which colour is rgb(0, 0, 0)? (a) blue (b) bright green (c) white (d) black
  39. 39.🌈 In #00d000 the green part is the hex number d0. What is it as a normal number?
  40. 40.🌈 Which colour of light is strongest in rgb(210, 88, 72)? (a) blue (b) red (c) green

Answer key

  1. blue
  2. 255
  3. bright green
  4. F
  5. blue
  6. blue
  7. #00ffff
  8. 90
  9. red
  10. blue
  11. #ff0000
  12. cyan
  13. black
  14. #ffff00
  15. red
  16. blue
  17. red
  18. 120
  19. 200
  20. 139
  21. green
  22. 40
  23. #ffffff
  24. 66
  25. 27
  26. #00ff00
  27. blue
  28. red
  29. #ff00ff
  30. 3
  31. yellow
  32. 24
  33. blue
  34. 20
  35. yellow
  36. cyan
  37. magenta
  38. black
  39. 208
  40. red

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