← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 61 · 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.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) Z (c) J (d) G
  2. 2.🌈 Which colour of light is strongest in rgb(85, 42, 204)? (a) green (b) blue (c) red
  3. 3.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 255 (c) 99 (d) 100
  4. 4.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) red (c) green (d) white
  5. 5.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) magenta (c) red (d) bright green
  6. 6.🌈 Which hex code is bright green? (a) #ffff00 (b) #ff00ff (c) #00ff00 (d) #ff0000
  7. 7.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) yellow (c) blue (d) bright green
  8. 8.🌈 In #a40000 the red part is the hex number a4. What is it as a normal number?
  9. 9.🌈 Which colour of light is strongest in rgb(71, 170, 89)? (a) blue (b) red (c) green
  10. 10.🌈 Which hex code is yellow? (a) #ffff00 (b) #000000 (c) #0000ff (d) #00ff00
  11. 11.🌈 Which colour is rgb(255, 255, 255)? (a) bright green (b) cyan (c) white (d) yellow
  12. 12.🌈 In #840000 the red part is the hex number 84. What is it as a normal number?
  13. 13.🌈 Which colour of light is strongest in rgb(162, 73, 0)? (a) blue (b) green (c) red
  14. 14.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) yellow (c) cyan (d) black
  15. 15.🌈 Which colour is #ffffff? (a) yellow (b) white (c) blue (d) red
  16. 16.🌈 Which colour is #00ff00? (a) yellow (b) bright green (c) cyan (d) white
  17. 17.🌈 Which colour is #00ffff? (a) red (b) cyan (c) white (d) magenta
  18. 18.🌈 Which colour is #ff0000? (a) white (b) black (c) red (d) yellow
  19. 19.🌈 Which hex code is red? (a) #0000ff (b) #ff00ff (c) #00ff00 (d) #ff0000
  20. 20.🌈 In #00fe00 the green part is the hex number fe. What is it as a normal number?
  21. 21.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) bright green (c) yellow (d) cyan
  22. 22.🌈 Which colour of light is strongest in rgb(49, 181, 73)? (a) blue (b) red (c) green
  23. 23.🌈 In #007b00 the green part is the hex number 7b. What is it as a normal number?
  24. 24.🌈 In #eb0000 the red part is the hex number eb. What is it as a normal number?
  25. 25.🌈 In #002100 the green part is the hex number 21. What is it as a normal number?
  26. 26.🌈 Which colour of light is strongest in rgb(63, 73, 165)? (a) green (b) blue (c) red
  27. 27.🌈 Which colour is #ff00ff? (a) white (b) yellow (c) magenta (d) red
  28. 28.🌈 Which colour of light is strongest in rgb(25, 226, 55)? (a) red (b) blue (c) green
  29. 29.🌈 Which hex code is magenta? (a) #ffffff (b) #ffff00 (c) #00ffff (d) #ff00ff
  30. 30.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 2 (d) 6
  31. 31.🌈 Which colour is #0000ff? (a) yellow (b) magenta (c) red (d) blue
  32. 32.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) red (d) blue
  33. 33.🌈 Which colour of light is strongest in rgb(68, 224, 19)? (a) red (b) blue (c) green
  34. 34.🌈 In #0000e1 the blue part is the hex number e1. What is it as a normal number?
  35. 35.🌈 In #00b600 the green part is the hex number b6. What is it as a normal number?
  36. 36.🌈 In #3f0000 the red part is the hex number 3f. What is it as a normal number?
  37. 37.🌈 Which hex code is black? (a) #00ffff (b) #0000ff (c) #000000 (d) #ff0000
  38. 38.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) blue (c) black (d) red
  39. 39.🌈 Which colour of light is strongest in rgb(2, 101, 184)? (a) green (b) blue (c) red
  40. 40.🌈 Which hex code is blue? (a) #00ff00 (b) #ff00ff (c) #ff0000 (d) #0000ff

Answer key

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

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