← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 55 · 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.🌈 In #0000e2 the blue part is the hex number e2. What is it as a normal number?
  2. 2.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) green (d) white
  3. 3.🌈 Which hex code is yellow? (a) #00ff00 (b) #000000 (c) #0000ff (d) #ffff00
  4. 4.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) red (d) blue
  5. 5.🌈 In #00de00 the green part is the hex number de. What is it as a normal number?
  6. 6.🌈 Which hex code is white? (a) #ff00ff (b) #0000ff (c) #000000 (d) #ffffff
  7. 7.🌈 Which colour is rgb(0, 255, 0)? (a) cyan (b) blue (c) magenta (d) bright green
  8. 8.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) F (c) J (d) Z
  9. 9.🌈 In #000021 the blue part is the hex number 21. What is it as a normal number?
  10. 10.🌈 In #000096 the blue part is the hex number 96. What is it as a normal number?
  11. 11.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) white (c) blue (d) magenta
  12. 12.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 6 (d) 4
  13. 13.🌈 Which hex code is magenta? (a) #ff0000 (b) #ff00ff (c) #00ffff (d) #00ff00
  14. 14.🌈 In #004f00 the green part is the hex number 4f. What is it as a normal number?
  15. 15.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 1000 (c) 100 (d) 99
  16. 16.🌈 Which colour of light is strongest in rgb(100, 77, 170)? (a) red (b) green (c) blue
  17. 17.🌈 Which colour is #ff0000? (a) bright green (b) magenta (c) red (d) white
  18. 18.🌈 Which hex code is black? (a) #00ff00 (b) #ff00ff (c) #000000 (d) #ffffff
  19. 19.🌈 In #004300 the green part is the hex number 43. What is it as a normal number?
  20. 20.🌈 Which colour is #00ff00? (a) red (b) blue (c) bright green (d) black
  21. 21.🌈 Which colour is #00ffff? (a) white (b) yellow (c) blue (d) cyan
  22. 22.🌈 Which colour is #ffffff? (a) yellow (b) blue (c) bright green (d) white
  23. 23.🌈 Which colour of light is strongest in rgb(2, 44, 198)? (a) red (b) green (c) blue
  24. 24.🌈 In #200000 the red part is the hex number 20. What is it as a normal number?
  25. 25.🌈 In #4b0000 the red part is the hex number 4b. What is it as a normal number?
  26. 26.🌈 Which hex code is cyan? (a) #ffffff (b) #0000ff (c) #ffff00 (d) #00ffff
  27. 27.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) cyan (c) blue (d) magenta
  28. 28.🌈 Which colour is #000000? (a) black (b) blue (c) bright green (d) red
  29. 29.🌈 Which colour of light is strongest in rgb(244, 96, 122)? (a) green (b) blue (c) red
  30. 30.🌈 In #b10000 the red part is the hex number b1. What is it as a normal number?
  31. 31.🌈 Which colour is #ffff00? (a) blue (b) cyan (c) red (d) yellow
  32. 32.🌈 Which colour of light is strongest in rgb(240, 45, 121)? (a) red (b) blue (c) green
  33. 33.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) bright green (c) red (d) black
  34. 34.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) bright green (c) yellow (d) magenta
  35. 35.🌈 Which colour of light is strongest in rgb(105, 132, 188)? (a) blue (b) red (c) green
  36. 36.🌈 Which colour of light is strongest in rgb(254, 0, 92)? (a) green (b) blue (c) red
  37. 37.🌈 Which colour is #0000ff? (a) white (b) magenta (c) red (d) blue
  38. 38.🌈 Which colour of light is strongest in rgb(58, 178, 22)? (a) blue (b) red (c) green
  39. 39.🌈 Which hex code is red? (a) #ff0000 (b) #ff00ff (c) #ffffff (d) #000000
  40. 40.🌈 Which hex code is blue? (a) #ff00ff (b) #000000 (c) #00ffff (d) #0000ff

Answer key

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

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