← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 212 · 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, 255, 0)? (a) white (b) yellow (c) cyan (d) blue
  2. 2.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 99 (d) 255
  3. 3.🌈 In #0000da the blue part is the hex number da. What is it as a normal number?
  4. 4.🌈 Which hex code is yellow? (a) #ff00ff (b) #ff0000 (c) #ffff00 (d) #ffffff
  5. 5.🌈 Which colour is #000000? (a) black (b) magenta (c) bright green (d) cyan
  6. 6.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) blue (d) green
  7. 7.🌈 In #0000c9 the blue part is the hex number c9. What is it as a normal number?
  8. 8.🌈 In #000002 the blue part is the hex number 02. What is it as a normal number?
  9. 9.🌈 Which colour of light is strongest in rgb(33, 121, 255)? (a) blue (b) red (c) green
  10. 10.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) F (d) J
  11. 11.🌈 Which colour is #00ffff? (a) magenta (b) cyan (c) black (d) yellow
  12. 12.🌈 Which hex code is black? (a) #ffff00 (b) #000000 (c) #ff0000 (d) #00ff00
  13. 13.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) blue (d) green
  14. 14.🌈 Which colour of light is strongest in rgb(222, 28, 81)? (a) red (b) blue (c) green
  15. 15.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) white (c) yellow (d) cyan
  16. 16.🌈 Which colour of light is strongest in rgb(43, 167, 72)? (a) green (b) red (c) blue
  17. 17.🌈 In #d80000 the red part is the hex number d8. What is it as a normal number?
  18. 18.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) cyan (c) red (d) white
  19. 19.🌈 In #0f0000 the red part is the hex number 0f. What is it as a normal number?
  20. 20.🌈 Which colour is #ffffff? (a) yellow (b) white (c) cyan (d) bright green
  21. 21.🌈 Which colour of light is strongest in rgb(116, 234, 37)? (a) blue (b) green (c) red
  22. 22.🌈 Which colour of light is strongest in rgb(176, 20, 46)? (a) green (b) blue (c) red
  23. 23.🌈 Which hex code is magenta? (a) #ffffff (b) #ff00ff (c) #ff0000 (d) #00ffff
  24. 24.🌈 Which colour of light is strongest in rgb(26, 105, 218)? (a) green (b) red (c) blue
  25. 25.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 6 (d) 3
  26. 26.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) blue (c) red (d) cyan
  27. 27.🌈 Which hex code is cyan? (a) #00ffff (b) #ff0000 (c) #ff00ff (d) #000000
  28. 28.🌈 Which colour is #ff00ff? (a) cyan (b) red (c) blue (d) magenta
  29. 29.🌈 Which hex code is blue? (a) #ffffff (b) #000000 (c) #ff0000 (d) #0000ff
  30. 30.🌈 Which hex code is bright green? (a) #0000ff (b) #ffffff (c) #000000 (d) #00ff00
  31. 31.🌈 Which hex code is red? (a) #0000ff (b) #00ff00 (c) #ff0000 (d) #ffff00
  32. 32.🌈 Which colour is #00ff00? (a) black (b) bright green (c) yellow (d) magenta
  33. 33.🌈 Which colour is #ff0000? (a) red (b) black (c) bright green (d) cyan
  34. 34.🌈 Which colour of light is strongest in rgb(10, 231, 48)? (a) blue (b) red (c) green
  35. 35.🌈 Which colour of light is strongest in rgb(87, 137, 188)? (a) green (b) red (c) blue
  36. 36.🌈 In #00001e the blue part is the hex number 1e. What is it as a normal number?
  37. 37.🌈 Which hex code is white? (a) #00ff00 (b) #ffffff (c) #ff00ff (d) #0000ff
  38. 38.🌈 In #007300 the green part is the hex number 73. What is it as a normal number?
  39. 39.🌈 Which colour of light is strongest in rgb(7, 125, 219)? (a) green (b) red (c) blue
  40. 40.🌈 Which colour of light is strongest in rgb(164, 128, 20)? (a) green (b) blue (c) red

Answer key

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

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