← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 46 · 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.🌈 Which colour is #ffffff? (a) black (b) cyan (c) white (d) bright green
  2. 2.🌈 In #780000 the red part is the hex number 78. What is it as a normal number?
  3. 3.🌈 Which colour is #0000ff? (a) bright green (b) red (c) black (d) blue
  4. 4.🌈 Which colour is #00ffff? (a) white (b) cyan (c) red (d) yellow
  5. 5.🌈 In #6f0000 the red part is the hex number 6f. What is it as a normal number?
  6. 6.🌈 Which hex code is bright green? (a) #0000ff (b) #ffffff (c) #00ffff (d) #00ff00
  7. 7.🌈 Which colour is #000000? (a) bright green (b) red (c) black (d) blue
  8. 8.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) red (d) blue
  9. 9.🌈 Which colour of light is strongest in rgb(209, 107, 32)? (a) blue (b) red (c) green
  10. 10.🌈 Which colour is #00ff00? (a) white (b) bright green (c) yellow (d) cyan
  11. 11.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 3 (d) 2
  12. 12.🌈 Which colour of light is strongest in rgb(88, 70, 169)? (a) blue (b) green (c) red
  13. 13.🌈 Which hex code is blue? (a) #0000ff (b) #ff00ff (c) #00ffff (d) #ff0000
  14. 14.🌈 Which hex code is white? (a) #0000ff (b) #ffff00 (c) #ffffff (d) #ff0000
  15. 15.🌈 In #c00000 the red part is the hex number c0. What is it as a normal number?
  16. 16.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 1000 (c) 255 (d) 100
  17. 17.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) red (d) white
  18. 18.🌈 In #0000ba the blue part is the hex number ba. What is it as a normal number?
  19. 19.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) white (c) yellow (d) cyan
  20. 20.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) cyan (c) red (d) blue
  21. 21.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) bright green (c) red (d) black
  22. 22.🌈 In #0000f9 the blue part is the hex number f9. What is it as a normal number?
  23. 23.🌈 In #000027 the blue part is the hex number 27. What is it as a normal number?
  24. 24.🌈 Which hex code is yellow? (a) #ffff00 (b) #ffffff (c) #ff00ff (d) #000000
  25. 25.🌈 In #0000ac the blue part is the hex number ac. What is it as a normal number?
  26. 26.🌈 Which colour of light is strongest in rgb(36, 126, 253)? (a) green (b) red (c) blue
  27. 27.🌈 In #3d0000 the red part is the hex number 3d. What is it as a normal number?
  28. 28.🌈 In #c20000 the red part is the hex number c2. What is it as a normal number?
  29. 29.🌈 In #005900 the green part is the hex number 59. What is it as a normal number?
  30. 30.🌈 In #000051 the blue part is the hex number 51. What is it as a normal number?
  31. 31.🌈 In #660000 the red part is the hex number 66. What is it as a normal number?
  32. 32.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) cyan (c) red (d) blue
  33. 33.🌈 Which colour of light is strongest in rgb(247, 109, 65)? (a) blue (b) green (c) red
  34. 34.🌈 In #006800 the green part is the hex number 68. What is it as a normal number?
  35. 35.🌈 Which colour is #ff00ff? (a) magenta (b) bright green (c) blue (d) black
  36. 36.🌈 Which colour of light is strongest in rgb(73, 238, 100)? (a) red (b) blue (c) green
  37. 37.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) Z (d) F
  38. 38.🌈 Which colour of light is strongest in rgb(81, 21, 163)? (a) blue (b) green (c) red
  39. 39.🌈 In #0000b2 the blue part is the hex number b2. What is it as a normal number?
  40. 40.🌈 In #003700 the green part is the hex number 37. What is it as a normal number?

Answer key

  1. white
  2. 120
  3. blue
  4. cyan
  5. 111
  6. #00ff00
  7. black
  8. red
  9. red
  10. bright green
  11. 3
  12. blue
  13. #0000ff
  14. #ffffff
  15. 192
  16. 255
  17. blue
  18. 186
  19. yellow
  20. red
  21. black
  22. 249
  23. 39
  24. #ffff00
  25. 172
  26. blue
  27. 61
  28. 194
  29. 89
  30. 81
  31. 102
  32. blue
  33. red
  34. 104
  35. magenta
  36. green
  37. F
  38. blue
  39. 178
  40. 55

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