← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 356 · 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 #530000 the red part is the hex number 53. What is it as a normal number?
  2. 2.🌈 Which hex code is red? (a) #00ffff (b) #ffffff (c) #ff0000 (d) #000000
  3. 3.🌈 Which colour is #00ffff? (a) white (b) yellow (c) cyan (d) magenta
  4. 4.🌈 Which colour of light is strongest in rgb(21, 154, 77)? (a) red (b) blue (c) green
  5. 5.🌈 In #00b400 the green part is the hex number b4. What is it as a normal number?
  6. 6.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 4 (c) 6 (d) 2
  7. 7.🌈 Which hex code is bright green? (a) #ffff00 (b) #000000 (c) #ff00ff (d) #00ff00
  8. 8.🌈 Which colour is rgb(0, 255, 255)? (a) magenta (b) black (c) white (d) cyan
  9. 9.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) green (d) black
  10. 10.🌈 Which colour is #ffffff? (a) magenta (b) yellow (c) white (d) blue
  11. 11.🌈 Which colour of light is strongest in rgb(173, 76, 22)? (a) red (b) blue (c) green
  12. 12.🌈 In #f60000 the red part is the hex number f6. What is it as a normal number?
  13. 13.🌈 Which hex code is cyan? (a) #00ff00 (b) #ffff00 (c) #ff0000 (d) #00ffff
  14. 14.🌈 In #260000 the red part is the hex number 26. What is it as a normal number?
  15. 15.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) blue (c) yellow (d) white
  16. 16.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) red (c) green (d) white
  17. 17.🌈 Which colour of light is strongest in rgb(100, 122, 185)? (a) green (b) red (c) blue
  18. 18.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 1000 (d) 255
  19. 19.🌈 In #00d900 the green part is the hex number d9. What is it as a normal number?
  20. 20.🌈 Which colour is #0000ff? (a) red (b) blue (c) black (d) cyan
  21. 21.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) red (c) bright green (d) cyan
  22. 22.🌈 Which colour of light is strongest in rgb(251, 15, 40)? (a) red (b) green (c) blue
  23. 23.🌈 Which colour is #ff0000? (a) blue (b) red (c) black (d) magenta
  24. 24.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) G (d) Z
  25. 25.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) red (c) magenta (d) cyan
  26. 26.🌈 Which colour is #ff00ff? (a) bright green (b) magenta (c) black (d) blue
  27. 27.🌈 Which hex code is yellow? (a) #0000ff (b) #00ff00 (c) #ff0000 (d) #ffff00
  28. 28.🌈 Which colour of light is strongest in rgb(5, 105, 196)? (a) green (b) red (c) blue
  29. 29.🌈 Which colour is #000000? (a) bright green (b) black (c) red (d) cyan
  30. 30.🌈 Which colour of light is strongest in rgb(29, 114, 195)? (a) green (b) red (c) blue
  31. 31.🌈 In #0000c6 the blue part is the hex number c6. What is it as a normal number?
  32. 32.🌈 In #002d00 the green part is the hex number 2d. What is it as a normal number?
  33. 33.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) cyan (c) blue (d) white
  34. 34.🌈 Which colour of light is strongest in rgb(42, 97, 197)? (a) blue (b) red (c) green
  35. 35.🌈 Which colour of light is strongest in rgb(200, 97, 39)? (a) green (b) red (c) blue
  36. 36.🌈 In #0000ca the blue part is the hex number ca. What is it as a normal number?
  37. 37.🌈 Which colour of light is strongest in rgb(132, 96, 161)? (a) blue (b) green (c) red
  38. 38.🌈 Which colour of light is strongest in rgb(40, 29, 150)? (a) blue (b) red (c) green
  39. 39.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) cyan (c) bright green (d) yellow
  40. 40.🌈 In #000097 the blue part is the hex number 97. What is it as a normal number?

Answer key

  1. 83
  2. #ff0000
  3. cyan
  4. green
  5. 180
  6. 3
  7. #00ff00
  8. cyan
  9. red
  10. white
  11. red
  12. 246
  13. #00ffff
  14. 38
  15. bright green
  16. blue
  17. blue
  18. 255
  19. 217
  20. blue
  21. black
  22. red
  23. red
  24. F
  25. magenta
  26. magenta
  27. #ffff00
  28. blue
  29. black
  30. blue
  31. 198
  32. 45
  33. blue
  34. blue
  35. red
  36. 202
  37. blue
  38. blue
  39. yellow
  40. 151

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