← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 339 · 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 rgb(255, 255, 0)? (a) black (b) white (c) red (d) yellow
  2. 2.🌈 In #000100 the green part is the hex number 01. What is it as a normal number?
  3. 3.🌈 Which colour is rgb(255, 0, 255)? (a) blue (b) black (c) red (d) magenta
  4. 4.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) blue (c) yellow (d) red
  5. 5.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 6 (d) 3
  6. 6.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) blue (c) white (d) red
  7. 7.🌈 Which colour is #ff00ff? (a) red (b) magenta (c) white (d) cyan
  8. 8.🌈 Which hex code is white? (a) #ff0000 (b) #ffffff (c) #00ffff (d) #ffff00
  9. 9.🌈 Which hex code is blue? (a) #00ff00 (b) #0000ff (c) #00ffff (d) #ff0000
  10. 10.🌈 Which colour is #ffffff? (a) black (b) cyan (c) white (d) magenta
  11. 11.🌈 Which colour is rgb(255, 0, 0)? (a) magenta (b) cyan (c) red (d) bright green
  12. 12.🌈 In #000068 the blue part is the hex number 68. What is it as a normal number?
  13. 13.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) G (d) F
  14. 14.🌈 Which hex code is black? (a) #00ff00 (b) #00ffff (c) #000000 (d) #ff00ff
  15. 15.🌈 Which colour is #ff0000? (a) white (b) red (c) bright green (d) magenta
  16. 16.🌈 In #000059 the blue part is the hex number 59. What is it as a normal number?
  17. 17.🌈 Which hex code is red? (a) #000000 (b) #ffff00 (c) #ff0000 (d) #ffffff
  18. 18.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) green (d) black
  19. 19.🌈 In #00d200 the green part is the hex number d2. What is it as a normal number?
  20. 20.🌈 In #c90000 the red part is the hex number c9. What is it as a normal number?
  21. 21.🌈 Which colour is #0000ff? (a) magenta (b) yellow (c) bright green (d) blue
  22. 22.🌈 In #850000 the red part is the hex number 85. What is it as a normal number?
  23. 23.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 1000 (c) 100 (d) 99
  24. 24.🌈 In #002b00 the green part is the hex number 2b. What is it as a normal number?
  25. 25.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) blue (c) black (d) yellow
  26. 26.🌈 Which colour is #ffff00? (a) blue (b) yellow (c) bright green (d) black
  27. 27.🌈 In #1b0000 the red part is the hex number 1b. What is it as a normal number?
  28. 28.🌈 Which colour of light is strongest in rgb(140, 53, 206)? (a) red (b) blue (c) green
  29. 29.🌈 Which colour of light is strongest in rgb(200, 115, 124)? (a) red (b) blue (c) green
  30. 30.🌈 In #006800 the green part is the hex number 68. What is it as a normal number?
  31. 31.🌈 Which hex code is yellow? (a) #00ffff (b) #ffff00 (c) #00ff00 (d) #ffffff
  32. 32.🌈 Which colour is #00ffff? (a) cyan (b) bright green (c) magenta (d) blue
  33. 33.🌈 Which hex code is bright green? (a) #ff00ff (b) #0000ff (c) #00ff00 (d) #ffffff
  34. 34.🌈 In #230000 the red part is the hex number 23. What is it as a normal number?
  35. 35.🌈 In #3e0000 the red part is the hex number 3e. What is it as a normal number?
  36. 36.🌈 Which colour of light is strongest in rgb(176, 85, 62)? (a) green (b) blue (c) red
  37. 37.🌈 In #005000 the green part is the hex number 50. What is it as a normal number?
  38. 38.🌈 In #002a00 the green part is the hex number 2a. What is it as a normal number?
  39. 39.🌈 Which colour of light is strongest in rgb(200, 137, 22)? (a) red (b) blue (c) green
  40. 40.🌈 Which colour of light is strongest in rgb(31, 214, 54)? (a) red (b) blue (c) green

Answer key

  1. yellow
  2. 1
  3. magenta
  4. white
  5. 3
  6. cyan
  7. magenta
  8. #ffffff
  9. #0000ff
  10. white
  11. red
  12. 104
  13. F
  14. #000000
  15. red
  16. 89
  17. #ff0000
  18. red
  19. 210
  20. 201
  21. blue
  22. 133
  23. 255
  24. 43
  25. bright green
  26. yellow
  27. 27
  28. blue
  29. red
  30. 104
  31. #ffff00
  32. cyan
  33. #00ff00
  34. 35
  35. 62
  36. red
  37. 80
  38. 42
  39. red
  40. green

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