← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 260 · 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 #000000? (a) white (b) cyan (c) bright green (d) black
  2. 2.🌈 Which hex code is bright green? (a) #00ffff (b) #ff0000 (c) #00ff00 (d) #0000ff
  3. 3.🌈 Which colour of light is strongest in rgb(110, 7, 220)? (a) red (b) green (c) blue
  4. 4.🌈 In #008000 the green part is the hex number 80. What is it as a normal number?
  5. 5.🌈 Which hex code is blue? (a) #0000ff (b) #000000 (c) #00ffff (d) #ff00ff
  6. 6.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) black (d) green
  7. 7.🌈 Which colour is #0000ff? (a) cyan (b) blue (c) magenta (d) white
  8. 8.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) white (c) cyan (d) red
  9. 9.🌈 Which colour of light is strongest in rgb(55, 11, 224)? (a) green (b) blue (c) red
  10. 10.🌈 Which colour of light is strongest in rgb(30, 150, 110)? (a) red (b) green (c) blue
  11. 11.🌈 Which hex code is white? (a) #ff0000 (b) #ffffff (c) #000000 (d) #00ffff
  12. 12.🌈 In #003100 the green part is the hex number 31. What is it as a normal number?
  13. 13.🌈 In #00009a the blue part is the hex number 9a. What is it as a normal number?
  14. 14.🌈 Which colour is #ffff00? (a) magenta (b) black (c) white (d) yellow
  15. 15.🌈 In #00dd00 the green part is the hex number dd. What is it as a normal number?
  16. 16.🌈 Which colour of light is strongest in rgb(188, 39, 4)? (a) red (b) green (c) blue
  17. 17.🌈 Which colour of light is strongest in rgb(211, 14, 34)? (a) blue (b) green (c) red
  18. 18.🌈 Which hex code is red? (a) #ffffff (b) #ff00ff (c) #ffff00 (d) #ff0000
  19. 19.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) green (c) white (d) red
  20. 20.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 1000 (d) 255
  21. 21.🌈 In #0000e3 the blue part is the hex number e3. What is it as a normal number?
  22. 22.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 4 (c) 6 (d) 2
  23. 23.🌈 In #250000 the red part is the hex number 25. What is it as a normal number?
  24. 24.🌈 Which colour is #ffffff? (a) red (b) blue (c) white (d) yellow
  25. 25.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) bright green (c) red (d) black
  26. 26.🌈 Which colour is #ff0000? (a) bright green (b) red (c) yellow (d) white
  27. 27.🌈 In #b20000 the red part is the hex number b2. What is it as a normal number?
  28. 28.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) G (d) F
  29. 29.🌈 Which colour of light is strongest in rgb(80, 2, 212)? (a) green (b) red (c) blue
  30. 30.🌈 Which colour is #ff00ff? (a) white (b) red (c) blue (d) magenta
  31. 31.🌈 In #000005 the blue part is the hex number 05. What is it as a normal number?
  32. 32.🌈 Which hex code is yellow? (a) #ffff00 (b) #000000 (c) #ff00ff (d) #00ff00
  33. 33.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) cyan (c) bright green (d) yellow
  34. 34.🌈 Which colour of light is strongest in rgb(254, 7, 132)? (a) blue (b) red (c) green
  35. 35.🌈 Which colour of light is strongest in rgb(196, 75, 21)? (a) red (b) green (c) blue
  36. 36.🌈 In #00009d the blue part is the hex number 9d. What is it as a normal number?
  37. 37.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) cyan (c) red (d) white
  38. 38.🌈 Which colour is #00ffff? (a) yellow (b) black (c) cyan (d) white
  39. 39.🌈 Which colour of light is strongest in rgb(117, 54, 173)? (a) green (b) blue (c) red
  40. 40.🌈 Which hex code is cyan? (a) #ffffff (b) #0000ff (c) #000000 (d) #00ffff

Answer key

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

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