← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 316 · 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 #00005f the blue part is the hex number 5f. What is it as a normal number?
  2. 2.🌈 Which hex code is white? (a) #000000 (b) #ff0000 (c) #ffffff (d) #00ffff
  3. 3.🌈 Which colour of light is strongest in rgb(187, 61, 118)? (a) green (b) red (c) blue
  4. 4.🌈 In #002400 the green part is the hex number 24. What is it as a normal number?
  5. 5.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) cyan (c) yellow (d) red
  6. 6.🌈 Which hex code is blue? (a) #ffff00 (b) #0000ff (c) #00ffff (d) #000000
  7. 7.🌈 In #006500 the green part is the hex number 65. What is it as a normal number?
  8. 8.🌈 In #00003c the blue part is the hex number 3c. What is it as a normal number?
  9. 9.🌈 Which hex code is black? (a) #ff0000 (b) #000000 (c) #ffffff (d) #0000ff
  10. 10.🌈 In #00c800 the green part is the hex number c8. What is it as a normal number?
  11. 11.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) magenta (c) white (d) bright green
  12. 12.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) F (d) J
  13. 13.🌈 Which hex code is bright green? (a) #00ff00 (b) #000000 (c) #ffffff (d) #ff0000
  14. 14.🌈 Which colour is #00ffff? (a) red (b) bright green (c) yellow (d) cyan
  15. 15.🌈 Which colour of light is strongest in rgb(86, 22, 229)? (a) red (b) green (c) blue
  16. 16.🌈 Which hex code is magenta? (a) #0000ff (b) #ffff00 (c) #ff00ff (d) #00ff00
  17. 17.🌈 Which colour of light is strongest in rgb(110, 139, 216)? (a) blue (b) green (c) red
  18. 18.🌈 In #a10000 the red part is the hex number a1. What is it as a normal number?
  19. 19.🌈 In #c40000 the red part is the hex number c4. What is it as a normal number?
  20. 20.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) blue (d) red
  21. 21.🌈 Which colour is #000000? (a) white (b) yellow (c) bright green (d) black
  22. 22.🌈 In #f20000 the red part is the hex number f2. What is it as a normal number?
  23. 23.🌈 Which hex code is yellow? (a) #000000 (b) #0000ff (c) #ff00ff (d) #ffff00
  24. 24.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) white (c) cyan (d) bright green
  25. 25.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) black (c) magenta (d) bright green
  26. 26.🌈 Which colour is #ffffff? (a) red (b) white (c) blue (d) bright green
  27. 27.🌈 Which colour of light is strongest in rgb(104, 248, 14)? (a) green (b) red (c) blue
  28. 28.🌈 In #000042 the blue part is the hex number 42. What is it as a normal number?
  29. 29.🌈 Which colour of light is strongest in rgb(13, 70, 235)? (a) red (b) green (c) blue
  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 #00ff00? (a) red (b) cyan (c) bright green (d) yellow
  32. 32.🌈 Which hex code is red? (a) #000000 (b) #00ffff (c) #ff00ff (d) #ff0000
  33. 33.🌈 Which colour of light is strongest in rgb(74, 170, 41)? (a) red (b) green (c) blue
  34. 34.🌈 Which colour of light is strongest in rgb(43, 159, 40)? (a) green (b) blue (c) red
  35. 35.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) magenta (c) red (d) bright green
  36. 36.🌈 Which colour of light is strongest in rgb(1, 150, 26)? (a) green (b) blue (c) red
  37. 37.🌈 In #00ba00 the green part is the hex number ba. What is it as a normal number?
  38. 38.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 99 (c) 255 (d) 100
  39. 39.🌈 Which colour is #0000ff? (a) magenta (b) cyan (c) blue (d) red
  40. 40.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) white (d) blue

Answer key

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

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