← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 359 · 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 #180000 the red part is the hex number 18. What is it as a normal number?
  2. 2.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) red (d) blue
  3. 3.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) bright green (c) white (d) red
  4. 4.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 99 (c) 100 (d) 1000
  5. 5.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) F (d) G
  6. 6.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 2 (d) 6
  7. 7.🌈 Which colour of light is strongest in rgb(184, 140, 23)? (a) green (b) blue (c) red
  8. 8.🌈 Which hex code is bright green? (a) #ffffff (b) #ff0000 (c) #ff00ff (d) #00ff00
  9. 9.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) red (c) blue (d) magenta
  10. 10.🌈 Which hex code is red? (a) #00ffff (b) #0000ff (c) #ffffff (d) #ff0000
  11. 11.🌈 In #a70000 the red part is the hex number a7. What is it as a normal number?
  12. 12.🌈 Which colour of light is strongest in rgb(56, 151, 55)? (a) red (b) blue (c) green
  13. 13.🌈 In #002900 the green part is the hex number 29. What is it as a normal number?
  14. 14.🌈 Which colour of light is strongest in rgb(61, 116, 205)? (a) blue (b) red (c) green
  15. 15.🌈 Which hex code is blue? (a) #000000 (b) #ffff00 (c) #0000ff (d) #ff00ff
  16. 16.🌈 Which hex code is yellow? (a) #00ffff (b) #000000 (c) #ffff00 (d) #0000ff
  17. 17.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) black (c) yellow (d) red
  18. 18.🌈 Which colour is #ff0000? (a) cyan (b) red (c) bright green (d) blue
  19. 19.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) bright green (c) yellow (d) magenta
  20. 20.🌈 Which colour of light is strongest in rgb(15, 126, 252)? (a) blue (b) red (c) green
  21. 21.🌈 Which colour is #ff00ff? (a) yellow (b) black (c) bright green (d) magenta
  22. 22.🌈 Which hex code is magenta? (a) #ff00ff (b) #ffff00 (c) #ffffff (d) #00ff00
  23. 23.🌈 Which colour is #ffffff? (a) red (b) white (c) blue (d) bright green
  24. 24.🌈 Which colour is #0000ff? (a) black (b) yellow (c) bright green (d) blue
  25. 25.🌈 In #0000de the blue part is the hex number de. What is it as a normal number?
  26. 26.🌈 Which colour of light is strongest in rgb(127, 38, 193)? (a) blue (b) green (c) red
  27. 27.🌈 Which colour of light is strongest in rgb(50, 221, 49)? (a) blue (b) red (c) green
  28. 28.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) bright green (c) red (d) yellow
  29. 29.🌈 Which colour of light is strongest in rgb(65, 208, 21)? (a) red (b) green (c) blue
  30. 30.🌈 Which colour is #00ffff? (a) blue (b) white (c) cyan (d) black
  31. 31.🌈 Which colour is #000000? (a) black (b) yellow (c) magenta (d) red
  32. 32.🌈 In #950000 the red part is the hex number 95. What is it as a normal number?
  33. 33.🌈 Which colour of light is strongest in rgb(58, 104, 243)? (a) green (b) blue (c) red
  34. 34.🌈 Which hex code is black? (a) #00ffff (b) #000000 (c) #0000ff (d) #00ff00
  35. 35.🌈 In #000200 the green part is the hex number 02. What is it as a normal number?
  36. 36.🌈 Which colour of light is strongest in rgb(187, 129, 93)? (a) blue (b) red (c) green
  37. 37.🌈 Which hex code is white? (a) #ff00ff (b) #000000 (c) #ffffff (d) #ffff00
  38. 38.🌈 In #8f0000 the red part is the hex number 8f. What is it as a normal number?
  39. 39.🌈 In #880000 the red part is the hex number 88. What is it as a normal number?
  40. 40.🌈 Which colour is #00ff00? (a) bright green (b) black (c) red (d) magenta

Answer key

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

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