← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 57 · 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 of light is strongest in rgb(243, 80, 121)? (a) red (b) green (c) blue
  2. 2.🌈 In #008d00 the green part is the hex number 8d. What is it as a normal number?
  3. 3.🌈 Which colour of light is strongest in rgb(195, 0, 122)? (a) red (b) green (c) blue
  4. 4.🌈 Which colour is #00ffff? (a) magenta (b) bright green (c) cyan (d) black
  5. 5.🌈 In #640000 the red part is the hex number 64. What is it as a normal number?
  6. 6.🌈 Which hex code is cyan? (a) #000000 (b) #ffffff (c) #ff0000 (d) #00ffff
  7. 7.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 6 (c) 2 (d) 4
  8. 8.🌈 Which colour of light is strongest in rgb(81, 216, 117)? (a) blue (b) green (c) red
  9. 9.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) blue (d) red
  10. 10.🌈 Which hex code is yellow? (a) #ffffff (b) #ffff00 (c) #000000 (d) #ff00ff
  11. 11.🌈 In #00002f the blue part is the hex number 2f. What is it as a normal number?
  12. 12.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) cyan (c) white (d) bright green
  13. 13.🌈 Which colour is #ffffff? (a) black (b) magenta (c) white (d) cyan
  14. 14.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) red (d) blue
  15. 15.🌈 In #d40000 the red part is the hex number d4. What is it as a normal number?
  16. 16.🌈 In #0000e1 the blue part is the hex number e1. What is it as a normal number?
  17. 17.🌈 Which hex code is magenta? (a) #ffffff (b) #0000ff (c) #ff00ff (d) #ff0000
  18. 18.🌈 Which hex code is black? (a) #00ffff (b) #000000 (c) #00ff00 (d) #ff00ff
  19. 19.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) yellow (c) cyan (d) black
  20. 20.🌈 In #0000fc the blue part is the hex number fc. What is it as a normal number?
  21. 21.🌈 Which hex code is red? (a) #ffff00 (b) #ff00ff (c) #ff0000 (d) #0000ff
  22. 22.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 99 (d) 255
  23. 23.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) white (c) blue (d) black
  24. 24.🌈 Which hex code is white? (a) #ffffff (b) #ff00ff (c) #000000 (d) #0000ff
  25. 25.🌈 Which colour is #00ff00? (a) magenta (b) bright green (c) yellow (d) black
  26. 26.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) cyan (c) bright green (d) magenta
  27. 27.🌈 Which colour of light is strongest in rgb(72, 33, 211)? (a) green (b) red (c) blue
  28. 28.🌈 Which colour is #000000? (a) bright green (b) blue (c) black (d) magenta
  29. 29.🌈 Which colour is #ff00ff? (a) yellow (b) black (c) red (d) magenta
  30. 30.🌈 Which colour is #ff0000? (a) bright green (b) black (c) red (d) white
  31. 31.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) black (c) bright green (d) blue
  32. 32.🌈 Which colour of light is strongest in rgb(33, 0, 161)? (a) green (b) blue (c) red
  33. 33.🌈 Which colour of light is strongest in rgb(104, 73, 170)? (a) green (b) blue (c) red
  34. 34.🌈 Which colour is rgb(0, 255, 0)? (a) magenta (b) bright green (c) black (d) yellow
  35. 35.🌈 Which colour is #0000ff? (a) black (b) yellow (c) magenta (d) blue
  36. 36.🌈 In #006b00 the green part is the hex number 6b. What is it as a normal number?
  37. 37.🌈 Which colour is #ffff00? (a) bright green (b) white (c) yellow (d) black
  38. 38.🌈 In #6c0000 the red part is the hex number 6c. What is it as a normal number?
  39. 39.🌈 In #010000 the red part is the hex number 01. What is it as a normal number?
  40. 40.🌈 In #df0000 the red part is the hex number df. What is it as a normal number?

Answer key

  1. red
  2. 141
  3. red
  4. cyan
  5. 100
  6. #00ffff
  7. 3
  8. green
  9. blue
  10. #ffff00
  11. 47
  12. white
  13. white
  14. red
  15. 212
  16. 225
  17. #ff00ff
  18. #000000
  19. cyan
  20. 252
  21. #ff0000
  22. 255
  23. red
  24. #ffffff
  25. bright green
  26. magenta
  27. blue
  28. black
  29. magenta
  30. red
  31. black
  32. blue
  33. blue
  34. bright green
  35. blue
  36. 107
  37. yellow
  38. 108
  39. 1
  40. 223

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