← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 155 · 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.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 6 (c) 3 (d) 4
  2. 2.🌈 Which colour of light is strongest in rgb(171, 97, 47)? (a) red (b) blue (c) green
  3. 3.🌈 Which hex code is yellow? (a) #0000ff (b) #ff0000 (c) #00ff00 (d) #ffff00
  4. 4.🌈 Which hex code is red? (a) #00ffff (b) #ff0000 (c) #0000ff (d) #00ff00
  5. 5.🌈 In #bf0000 the red part is the hex number bf. What is it as a normal number?
  6. 6.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) bright green (c) blue (d) yellow
  7. 7.🌈 In #0000f0 the blue part is the hex number f0. What is it as a normal number?
  8. 8.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) blue (c) magenta (d) bright green
  9. 9.🌈 In #730000 the red part is the hex number 73. What is it as a normal number?
  10. 10.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) white (c) red (d) yellow
  11. 11.🌈 Which hex code is blue? (a) #000000 (b) #0000ff (c) #ffffff (d) #ff0000
  12. 12.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) F (c) J (d) Z
  13. 13.🌈 In #008b00 the green part is the hex number 8b. What is it as a normal number?
  14. 14.🌈 Which colour is #0000ff? (a) red (b) bright green (c) blue (d) black
  15. 15.🌈 Which hex code is magenta? (a) #ffffff (b) #ff00ff (c) #0000ff (d) #00ffff
  16. 16.🌈 Which hex code is black? (a) #00ffff (b) #ffff00 (c) #000000 (d) #00ff00
  17. 17.🌈 Which colour is #ffff00? (a) blue (b) yellow (c) magenta (d) black
  18. 18.🌈 In #000071 the blue part is the hex number 71. What is it as a normal number?
  19. 19.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 255 (c) 99 (d) 100
  20. 20.🌈 Which colour is #ff00ff? (a) cyan (b) magenta (c) red (d) bright green
  21. 21.🌈 Which colour is #ff0000? (a) black (b) white (c) red (d) bright green
  22. 22.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
  23. 23.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) white (c) cyan (d) red
  24. 24.🌈 Which colour of light is strongest in rgb(176, 73, 123)? (a) blue (b) red (c) green
  25. 25.🌈 In #540000 the red part is the hex number 54. What is it as a normal number?
  26. 26.🌈 In #000044 the blue part is the hex number 44. What is it as a normal number?
  27. 27.🌈 In #00007d the blue part is the hex number 7d. What is it as a normal number?
  28. 28.🌈 In #00fc00 the green part is the hex number fc. What is it as a normal number?
  29. 29.🌈 Which colour is #00ffff? (a) magenta (b) white (c) red (d) cyan
  30. 30.🌈 Which colour is #ffffff? (a) red (b) white (c) black (d) cyan
  31. 31.🌈 Which colour of light is strongest in rgb(48, 193, 85)? (a) blue (b) red (c) green
  32. 32.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) white (c) green (d) red
  33. 33.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) blue (c) yellow (d) cyan
  34. 34.🌈 In #006a00 the green part is the hex number 6a. What is it as a normal number?
  35. 35.🌈 Which colour is #000000? (a) black (b) bright green (c) magenta (d) blue
  36. 36.🌈 In #000033 the blue part is the hex number 33. What is it as a normal number?
  37. 37.🌈 Which colour of light is strongest in rgb(224, 117, 137)? (a) green (b) red (c) blue
  38. 38.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) cyan (c) yellow (d) blue
  39. 39.🌈 In #00e900 the green part is the hex number e9. What is it as a normal number?
  40. 40.🌈 In #000095 the blue part is the hex number 95. What is it as a normal number?

Answer key

  1. 3
  2. red
  3. #ffff00
  4. #ff0000
  5. 191
  6. blue
  7. 240
  8. bright green
  9. 115
  10. white
  11. #0000ff
  12. F
  13. 139
  14. blue
  15. #ff00ff
  16. #000000
  17. yellow
  18. 113
  19. 255
  20. magenta
  21. red
  22. red
  23. red
  24. red
  25. 84
  26. 68
  27. 125
  28. 252
  29. cyan
  30. white
  31. green
  32. blue
  33. cyan
  34. 106
  35. black
  36. 51
  37. red
  38. yellow
  39. 233
  40. 149

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