← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 358 · 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(130, 220, 104)? (a) red (b) blue (c) green
  2. 2.🌈 Which colour is #ffffff? (a) black (b) yellow (c) red (d) white
  3. 3.🌈 Which hex code is blue? (a) #ff00ff (b) #00ffff (c) #00ff00 (d) #0000ff
  4. 4.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) white (c) blue (d) red
  5. 5.🌈 In #008300 the green part is the hex number 83. What is it as a normal number?
  6. 6.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) G (d) F
  7. 7.🌈 In #006a00 the green part is the hex number 6a. What is it as a normal number?
  8. 8.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) magenta (c) red (d) blue
  9. 9.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) red (d) green
  10. 10.🌈 Which colour is #ff00ff? (a) black (b) magenta (c) bright green (d) white
  11. 11.🌈 In #2e0000 the red part is the hex number 2e. What is it as a normal number?
  12. 12.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) blue (d) white
  13. 13.🌈 In #a20000 the red part is the hex number a2. What is it as a normal number?
  14. 14.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 3 (d) 6
  15. 15.🌈 Which colour of light is strongest in rgb(220, 97, 59)? (a) blue (b) red (c) green
  16. 16.🌈 Which colour is rgb(0, 0, 255)? (a) white (b) bright green (c) magenta (d) blue
  17. 17.🌈 Which colour of light is strongest in rgb(183, 30, 117)? (a) green (b) blue (c) red
  18. 18.🌈 In #0000ad the blue part is the hex number ad. What is it as a normal number?
  19. 19.🌈 Which hex code is red? (a) #0000ff (b) #00ff00 (c) #ff0000 (d) #ffffff
  20. 20.🌈 In #0000d4 the blue part is the hex number d4. What is it as a normal number?
  21. 21.🌈 Which hex code is white? (a) #00ff00 (b) #000000 (c) #ffffff (d) #ff00ff
  22. 22.🌈 Which colour is #000000? (a) blue (b) black (c) bright green (d) magenta
  23. 23.🌈 Which hex code is black? (a) #0000ff (b) #00ff00 (c) #ffffff (d) #000000
  24. 24.🌈 Which hex code is cyan? (a) #000000 (b) #00ffff (c) #ff00ff (d) #00ff00
  25. 25.🌈 Which colour of light is strongest in rgb(178, 124, 70)? (a) green (b) blue (c) red
  26. 26.🌈 Which colour of light is strongest in rgb(197, 95, 12)? (a) green (b) red (c) blue
  27. 27.🌈 Which hex code is yellow? (a) #000000 (b) #ff0000 (c) #ffff00 (d) #0000ff
  28. 28.🌈 Which colour of light is strongest in rgb(184, 73, 64)? (a) blue (b) red (c) green
  29. 29.🌈 Which hex code is bright green? (a) #00ff00 (b) #000000 (c) #00ffff (d) #ffff00
  30. 30.🌈 Which colour is #ffff00? (a) white (b) blue (c) red (d) yellow
  31. 31.🌈 In #00003f the blue part is the hex number 3f. What is it as a normal number?
  32. 32.🌈 Which colour of light is strongest in rgb(41, 224, 99)? (a) blue (b) green (c) red
  33. 33.🌈 In #000014 the blue part is the hex number 14. What is it as a normal number?
  34. 34.🌈 Which colour is #00ff00? (a) bright green (b) red (c) cyan (d) yellow
  35. 35.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) cyan (c) yellow (d) white
  36. 36.🌈 Which colour of light is strongest in rgb(250, 47, 86)? (a) blue (b) green (c) red
  37. 37.🌈 Which colour of light is strongest in rgb(127, 10, 158)? (a) red (b) blue (c) green
  38. 38.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) red (c) blue (d) cyan
  39. 39.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) magenta (c) white (d) red
  40. 40.🌈 In #00005f the blue part is the hex number 5f. What is it as a normal number?

Answer key

  1. green
  2. white
  3. #0000ff
  4. yellow
  5. 131
  6. F
  7. 106
  8. red
  9. red
  10. magenta
  11. 46
  12. blue
  13. 162
  14. 3
  15. red
  16. blue
  17. red
  18. 173
  19. #ff0000
  20. 212
  21. #ffffff
  22. black
  23. #000000
  24. #00ffff
  25. red
  26. red
  27. #ffff00
  28. red
  29. #00ff00
  30. yellow
  31. 63
  32. green
  33. 20
  34. bright green
  35. bright green
  36. red
  37. blue
  38. cyan
  39. white
  40. 95

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