← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 81 · 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 hex code is cyan? (a) #00ff00 (b) #ffff00 (c) #00ffff (d) #000000
  2. 2.🌈 Which colour is #00ff00? (a) bright green (b) black (c) cyan (d) yellow
  3. 3.🌈 Which colour is rgb(0, 0, 255)? (a) white (b) cyan (c) yellow (d) blue
  4. 4.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 99 (c) 100 (d) 1000
  5. 5.🌈 Which colour of light is strongest in rgb(184, 31, 130)? (a) blue (b) red (c) green
  6. 6.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) F (c) Z (d) J
  7. 7.🌈 Which colour of light is strongest in rgb(238, 4, 77)? (a) green (b) blue (c) red
  8. 8.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) black (d) red
  9. 9.🌈 Which colour is #0000ff? (a) black (b) blue (c) red (d) bright green
  10. 10.🌈 In #210000 the red part is the hex number 21. What is it as a normal number?
  11. 11.🌈 In #004d00 the green part is the hex number 4d. What is it as a normal number?
  12. 12.🌈 In #f60000 the red part is the hex number f6. What is it as a normal number?
  13. 13.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) magenta (c) black (d) bright green
  14. 14.🌈 Which colour is #ff00ff? (a) white (b) magenta (c) black (d) blue
  15. 15.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) green (c) red (d) white
  16. 16.🌈 Which colour is #ff0000? (a) magenta (b) blue (c) black (d) red
  17. 17.🌈 Which hex code is black? (a) #00ff00 (b) #000000 (c) #ffffff (d) #ffff00
  18. 18.🌈 Which colour is rgb(255, 0, 0)? (a) white (b) bright green (c) red (d) magenta
  19. 19.🌈 Which colour is #ffff00? (a) black (b) red (c) yellow (d) magenta
  20. 20.🌈 In #8f0000 the red part is the hex number 8f. What is it as a normal number?
  21. 21.🌈 Which colour of light is strongest in rgb(70, 138, 247)? (a) green (b) blue (c) red
  22. 22.🌈 Which hex code is bright green? (a) #ffffff (b) #ffff00 (c) #0000ff (d) #00ff00
  23. 23.🌈 Which colour is rgb(0, 0, 0)? (a) magenta (b) yellow (c) black (d) blue
  24. 24.🌈 In #008100 the green part is the hex number 81. What is it as a normal number?
  25. 25.🌈 Which colour of light is strongest in rgb(92, 59, 205)? (a) green (b) red (c) blue
  26. 26.🌈 Which colour is #ffffff? (a) white (b) black (c) bright green (d) yellow
  27. 27.🌈 Which colour is #00ffff? (a) magenta (b) cyan (c) yellow (d) white
  28. 28.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) cyan (c) bright green (d) blue
  29. 29.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 6 (d) 3
  30. 30.🌈 In #450000 the red part is the hex number 45. What is it as a normal number?
  31. 31.🌈 In #00002b the blue part is the hex number 2b. What is it as a normal number?
  32. 32.🌈 Which colour of light is strongest in rgb(101, 43, 156)? (a) blue (b) red (c) green
  33. 33.🌈 Which colour is #000000? (a) white (b) black (c) cyan (d) yellow
  34. 34.🌈 Which colour of light is strongest in rgb(73, 157, 13)? (a) red (b) green (c) blue
  35. 35.🌈 Which hex code is red? (a) #ff0000 (b) #ff00ff (c) #000000 (d) #00ff00
  36. 36.🌈 In #009600 the green part is the hex number 96. What is it as a normal number?
  37. 37.🌈 In #00d600 the green part is the hex number d6. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(37, 102, 188)? (a) green (b) blue (c) red
  39. 39.🌈 In #00bf00 the green part is the hex number bf. What is it as a normal number?
  40. 40.🌈 In #000055 the blue part is the hex number 55. What is it as a normal number?

Answer key

  1. #00ffff
  2. bright green
  3. blue
  4. 255
  5. red
  6. F
  7. red
  8. red
  9. blue
  10. 33
  11. 77
  12. 246
  13. bright green
  14. magenta
  15. blue
  16. red
  17. #000000
  18. red
  19. yellow
  20. 143
  21. blue
  22. #00ff00
  23. black
  24. 129
  25. blue
  26. white
  27. cyan
  28. cyan
  29. 3
  30. 69
  31. 43
  32. blue
  33. black
  34. green
  35. #ff0000
  36. 150
  37. 214
  38. blue
  39. 191
  40. 85

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