← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 100 · 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.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 255 (d) 1000
  2. 2.🌈 Which hex code is white? (a) #ffffff (b) #ffff00 (c) #ff00ff (d) #ff0000
  3. 3.🌈 Which hex code is cyan? (a) #00ffff (b) #0000ff (c) #00ff00 (d) #ffff00
  4. 4.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) green (d) red
  5. 5.🌈 Which colour of light is strongest in rgb(227, 44, 129)? (a) blue (b) red (c) green
  6. 6.🌈 Which hex code is red? (a) #ffff00 (b) #00ff00 (c) #ff0000 (d) #ffffff
  7. 7.🌈 Which colour is #00ffff? (a) black (b) magenta (c) white (d) cyan
  8. 8.🌈 Which colour is #ffff00? (a) yellow (b) bright green (c) black (d) red
  9. 9.🌈 Which colour is rgb(255, 0, 255)? (a) blue (b) white (c) red (d) magenta
  10. 10.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) J (c) F (d) Z
  11. 11.🌈 Which colour of light is strongest in rgb(123, 119, 248)? (a) red (b) green (c) blue
  12. 12.🌈 Which colour of light is strongest in rgb(152, 25, 124)? (a) blue (b) green (c) red
  13. 13.🌈 In #000c00 the green part is the hex number 0c. What is it as a normal number?
  14. 14.🌈 Which hex code is blue? (a) #0000ff (b) #000000 (c) #ffffff (d) #00ffff
  15. 15.🌈 In #002100 the green part is the hex number 21. What is it as a normal number?
  16. 16.🌈 Which colour is #000000? (a) black (b) bright green (c) magenta (d) cyan
  17. 17.🌈 Which colour of light is strongest in rgb(129, 151, 20)? (a) green (b) blue (c) red
  18. 18.🌈 Which colour of light is strongest in rgb(214, 25, 63)? (a) blue (b) red (c) green
  19. 19.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) red (d) blue
  20. 20.🌈 In #009f00 the green part is the hex number 9f. What is it as a normal number?
  21. 21.🌈 In #004700 the green part is the hex number 47. What is it as a normal number?
  22. 22.🌈 Which hex code is magenta? (a) #ffff00 (b) #00ff00 (c) #ff00ff (d) #000000
  23. 23.🌈 Which colour of light is strongest in rgb(36, 132, 170)? (a) blue (b) green (c) red
  24. 24.🌈 Which colour of light is strongest in rgb(250, 128, 66)? (a) red (b) blue (c) green
  25. 25.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) blue (c) cyan (d) red
  26. 26.🌈 Which colour of light is strongest in rgb(129, 220, 129)? (a) red (b) blue (c) green
  27. 27.🌈 Which colour is #ff0000? (a) magenta (b) cyan (c) red (d) yellow
  28. 28.🌈 Which colour of light is strongest in rgb(250, 8, 10)? (a) red (b) blue (c) green
  29. 29.🌈 In #00b300 the green part is the hex number b3. What is it as a normal number?
  30. 30.🌈 Which hex code is yellow? (a) #ffffff (b) #000000 (c) #ffff00 (d) #ff0000
  31. 31.🌈 Which colour is rgb(0, 255, 255)? (a) red (b) cyan (c) white (d) blue
  32. 32.🌈 In #010000 the red part is the hex number 01. What is it as a normal number?
  33. 33.🌈 In #000056 the blue part is the hex number 56. What is it as a normal number?
  34. 34.🌈 Which colour of light is strongest in rgb(250, 127, 94)? (a) green (b) blue (c) red
  35. 35.🌈 In #00000f the blue part is the hex number 0f. What is it as a normal number?
  36. 36.🌈 Which colour of light is strongest in rgb(85, 77, 230)? (a) green (b) blue (c) red
  37. 37.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) white (c) bright green (d) blue
  38. 38.🌈 Which colour is #00ff00? (a) red (b) magenta (c) bright green (d) black
  39. 39.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) yellow (c) white (d) red
  40. 40.🌈 Which colour is #ff00ff? (a) magenta (b) red (c) white (d) bright green

Answer key

  1. 255
  2. #ffffff
  3. #00ffff
  4. red
  5. red
  6. #ff0000
  7. cyan
  8. yellow
  9. magenta
  10. F
  11. blue
  12. red
  13. 12
  14. #0000ff
  15. 33
  16. black
  17. green
  18. red
  19. blue
  20. 159
  21. 71
  22. #ff00ff
  23. blue
  24. red
  25. red
  26. green
  27. red
  28. red
  29. 179
  30. #ffff00
  31. cyan
  32. 1
  33. 86
  34. red
  35. 15
  36. blue
  37. bright green
  38. bright green
  39. white
  40. magenta

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