← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 22 · 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(0, 255, 0)? (a) yellow (b) bright green (c) black (d) magenta
  2. 2.🌈 Which colour is rgb(255, 255, 0)? (a) black (b) magenta (c) white (d) yellow
  3. 3.🌈 Which colour is #0000ff? (a) cyan (b) bright green (c) magenta (d) blue
  4. 4.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 1000 (d) 99
  5. 5.🌈 In #4d0000 the red part is the hex number 4d. What is it as a normal number?
  6. 6.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) Z (d) G
  7. 7.🌈 In #a00000 the red part is the hex number a0. What is it as a normal number?
  8. 8.🌈 In #001100 the green part is the hex number 11. What is it as a normal number?
  9. 9.🌈 Which colour of light is strongest in rgb(166, 31, 13)? (a) blue (b) red (c) green
  10. 10.🌈 Which colour is #ff00ff? (a) cyan (b) blue (c) magenta (d) white
  11. 11.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) blue (d) black
  12. 12.🌈 Which colour of light is strongest in rgb(104, 115, 152)? (a) red (b) green (c) blue
  13. 13.🌈 Which colour is rgb(0, 255, 255)? (a) red (b) yellow (c) black (d) cyan
  14. 14.🌈 Which colour is #000000? (a) white (b) magenta (c) black (d) bright green
  15. 15.🌈 Which colour is rgb(255, 0, 255)? (a) cyan (b) black (c) blue (d) magenta
  16. 16.🌈 Which colour is rgb(0, 0, 255)? (a) white (b) cyan (c) blue (d) black
  17. 17.🌈 Which colour is #ffff00? (a) bright green (b) red (c) yellow (d) blue
  18. 18.🌈 Which colour of light is strongest in rgb(91, 177, 134)? (a) red (b) blue (c) green
  19. 19.🌈 In #000033 the blue part is the hex number 33. What is it as a normal number?
  20. 20.🌈 In #410000 the red part is the hex number 41. What is it as a normal number?
  21. 21.🌈 In #0a0000 the red part is the hex number 0a. What is it as a normal number?
  22. 22.🌈 Which hex code is blue? (a) #000000 (b) #00ff00 (c) #ffff00 (d) #0000ff
  23. 23.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) green (d) red
  24. 24.🌈 Which colour is rgb(255, 255, 255)? (a) red (b) white (c) cyan (d) blue
  25. 25.🌈 Which colour of light is strongest in rgb(1, 166, 76)? (a) green (b) red (c) blue
  26. 26.🌈 In #0000c3 the blue part is the hex number c3. What is it as a normal number?
  27. 27.🌈 Which hex code is bright green? (a) #ffff00 (b) #0000ff (c) #00ff00 (d) #ffffff
  28. 28.🌈 Which colour of light is strongest in rgb(111, 180, 120)? (a) red (b) green (c) blue
  29. 29.🌈 In #af0000 the red part is the hex number af. What is it as a normal number?
  30. 30.🌈 Which colour is #ff0000? (a) red (b) magenta (c) yellow (d) black
  31. 31.🌈 Which hex code is magenta? (a) #00ff00 (b) #000000 (c) #ff00ff (d) #ff0000
  32. 32.🌈 In #2c0000 the red part is the hex number 2c. What is it as a normal number?
  33. 33.🌈 Which hex code is white? (a) #ffffff (b) #ffff00 (c) #0000ff (d) #ff0000
  34. 34.🌈 In #500000 the red part is the hex number 50. What is it as a normal number?
  35. 35.🌈 In #00b400 the green part is the hex number b4. What is it as a normal number?
  36. 36.🌈 Which colour of light is strongest in rgb(51, 39, 174)? (a) red (b) blue (c) green
  37. 37.🌈 Which colour is #ffffff? (a) magenta (b) bright green (c) black (d) white
  38. 38.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) red (c) black (d) yellow
  39. 39.🌈 Which colour of light is strongest in rgb(51, 182, 43)? (a) green (b) red (c) blue
  40. 40.🌈 In #008100 the green part is the hex number 81. What is it as a normal number?

Answer key

  1. bright green
  2. yellow
  3. blue
  4. 255
  5. 77
  6. F
  7. 160
  8. 17
  9. red
  10. magenta
  11. red
  12. blue
  13. cyan
  14. black
  15. magenta
  16. blue
  17. yellow
  18. green
  19. 51
  20. 65
  21. 10
  22. #0000ff
  23. blue
  24. white
  25. green
  26. 195
  27. #00ff00
  28. green
  29. 175
  30. red
  31. #ff00ff
  32. 44
  33. #ffffff
  34. 80
  35. 180
  36. blue
  37. white
  38. red
  39. green
  40. 129

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