← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 235 · 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) 6 (b) 2 (c) 3 (d) 4
  2. 2.🌈 In #002e00 the green part is the hex number 2e. What is it as a normal number?
  3. 3.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) white (c) green (d) blue
  4. 4.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) green (d) blue
  5. 5.🌈 Which colour is #ffff00? (a) blue (b) red (c) cyan (d) yellow
  6. 6.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) bright green (c) blue (d) magenta
  7. 7.🌈 In #006f00 the green part is the hex number 6f. What is it as a normal number?
  8. 8.🌈 Which hex code is blue? (a) #00ff00 (b) #ffffff (c) #0000ff (d) #000000
  9. 9.🌈 Which colour is #ff0000? (a) blue (b) white (c) bright green (d) red
  10. 10.🌈 Which colour is rgb(0, 0, 0)? (a) blue (b) black (c) yellow (d) bright green
  11. 11.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 99 (d) 1000
  12. 12.🌈 Which colour is #00ff00? (a) black (b) cyan (c) bright green (d) red
  13. 13.🌈 In #530000 the red part is the hex number 53. What is it as a normal number?
  14. 14.🌈 In #000009 the blue part is the hex number 09. What is it as a normal number?
  15. 15.🌈 In #e70000 the red part is the hex number e7. What is it as a normal number?
  16. 16.🌈 Which colour of light is strongest in rgb(165, 125, 129)? (a) blue (b) red (c) green
  17. 17.🌈 Which colour is #00ffff? (a) red (b) magenta (c) white (d) cyan
  18. 18.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) yellow (c) black (d) white
  19. 19.🌈 Which colour of light is strongest in rgb(219, 55, 137)? (a) green (b) blue (c) red
  20. 20.🌈 Which hex code is black? (a) #ffff00 (b) #00ffff (c) #ff00ff (d) #000000
  21. 21.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) black (c) blue (d) red
  22. 22.🌈 In #000800 the green part is the hex number 08. What is it as a normal number?
  23. 23.🌈 Which colour is #ff00ff? (a) bright green (b) white (c) yellow (d) magenta
  24. 24.🌈 Which hex code is yellow? (a) #0000ff (b) #ffff00 (c) #ff00ff (d) #ff0000
  25. 25.🌈 In #d20000 the red part is the hex number d2. What is it as a normal number?
  26. 26.🌈 Which colour is #ffffff? (a) blue (b) white (c) black (d) cyan
  27. 27.🌈 Which hex code is cyan? (a) #000000 (b) #ff00ff (c) #ffffff (d) #00ffff
  28. 28.🌈 Which hex code is bright green? (a) #000000 (b) #00ff00 (c) #ff00ff (d) #ffff00
  29. 29.🌈 Which colour of light is strongest in rgb(162, 125, 138)? (a) blue (b) red (c) green
  30. 30.🌈 In #0000a3 the blue part is the hex number a3. What is it as a normal number?
  31. 31.🌈 Which colour of light is strongest in rgb(193, 105, 91)? (a) green (b) blue (c) red
  32. 32.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) yellow (c) red (d) white
  33. 33.🌈 Which colour of light is strongest in rgb(106, 122, 161)? (a) red (b) green (c) blue
  34. 34.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) yellow (c) magenta (d) blue
  35. 35.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) F (d) J
  36. 36.🌈 In #0000b3 the blue part is the hex number b3. What is it as a normal number?
  37. 37.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) yellow (c) cyan (d) blue
  38. 38.🌈 Which colour of light is strongest in rgb(38, 58, 176)? (a) red (b) green (c) blue
  39. 39.🌈 In #008c00 the green part is the hex number 8c. What is it as a normal number?
  40. 40.🌈 In #006b00 the green part is the hex number 6b. What is it as a normal number?

Answer key

  1. 3
  2. 46
  3. blue
  4. red
  5. yellow
  6. blue
  7. 111
  8. #0000ff
  9. red
  10. black
  11. 255
  12. bright green
  13. 83
  14. 9
  15. 231
  16. red
  17. cyan
  18. red
  19. red
  20. #000000
  21. bright green
  22. 8
  23. magenta
  24. #ffff00
  25. 210
  26. white
  27. #00ffff
  28. #00ff00
  29. red
  30. 163
  31. red
  32. white
  33. blue
  34. cyan
  35. F
  36. 179
  37. yellow
  38. blue
  39. 140
  40. 107

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