← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 237 · 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(40, 38, 227)? (a) green (b) blue (c) red
  2. 2.🌈 Which colour is #000000? (a) magenta (b) white (c) bright green (d) black
  3. 3.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) yellow (c) black (d) bright green
  4. 4.🌈 Which colour of light is strongest in rgb(156, 88, 8)? (a) green (b) red (c) blue
  5. 5.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 3 (d) 6
  6. 6.🌈 Which hex code is blue? (a) #ff00ff (b) #000000 (c) #00ffff (d) #0000ff
  7. 7.🌈 Which colour is #00ff00? (a) white (b) black (c) red (d) bright green
  8. 8.🌈 In #004600 the green part is the hex number 46. What is it as a normal number?
  9. 9.🌈 Which colour is #ff00ff? (a) white (b) black (c) magenta (d) blue
  10. 10.🌈 Which hex code is bright green? (a) #ff0000 (b) #00ff00 (c) #ffff00 (d) #00ffff
  11. 11.🌈 Which hex code is yellow? (a) #ff00ff (b) #ffff00 (c) #ffffff (d) #00ff00
  12. 12.🌈 Which colour is #00ffff? (a) yellow (b) cyan (c) red (d) blue
  13. 13.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) red (d) green
  14. 14.🌈 Which hex code is red? (a) #00ffff (b) #ff0000 (c) #000000 (d) #ffff00
  15. 15.🌈 Which colour is #ffff00? (a) red (b) bright green (c) magenta (d) yellow
  16. 16.🌈 Which colour is #0000ff? (a) magenta (b) blue (c) black (d) bright green
  17. 17.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) G (d) F
  18. 18.🌈 Which hex code is black? (a) #00ff00 (b) #ffffff (c) #ffff00 (d) #000000
  19. 19.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) bright green (c) red (d) blue
  20. 20.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 100 (d) 1000
  21. 21.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) black (d) green
  22. 22.🌈 Which hex code is cyan? (a) #ff00ff (b) #ffffff (c) #0000ff (d) #00ffff
  23. 23.🌈 Which hex code is white? (a) #ffffff (b) #ff00ff (c) #00ffff (d) #ff0000
  24. 24.🌈 Which colour of light is strongest in rgb(56, 46, 214)? (a) green (b) red (c) blue
  25. 25.🌈 In #002900 the green part is the hex number 29. What is it as a normal number?
  26. 26.🌈 Which colour is #ff0000? (a) yellow (b) red (c) cyan (d) white
  27. 27.🌈 Which colour is #ffffff? (a) black (b) cyan (c) white (d) red
  28. 28.🌈 Which colour of light is strongest in rgb(73, 99, 159)? (a) green (b) blue (c) red
  29. 29.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) red (c) white (d) bright green
  30. 30.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) cyan (c) red (d) magenta
  31. 31.🌈 Which colour of light is strongest in rgb(97, 222, 133)? (a) red (b) green (c) blue
  32. 32.🌈 In #0000bb the blue part is the hex number bb. What is it as a normal number?
  33. 33.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) yellow (c) black (d) cyan
  34. 34.🌈 In #00004f the blue part is the hex number 4f. What is it as a normal number?
  35. 35.🌈 Which colour of light is strongest in rgb(107, 208, 132)? (a) blue (b) red (c) green
  36. 36.🌈 Which colour of light is strongest in rgb(240, 140, 118)? (a) blue (b) green (c) red
  37. 37.🌈 Which colour of light is strongest in rgb(71, 101, 191)? (a) red (b) blue (c) green
  38. 38.🌈 Which colour of light is strongest in rgb(158, 36, 55)? (a) green (b) red (c) blue
  39. 39.🌈 Which colour of light is strongest in rgb(3, 122, 160)? (a) red (b) green (c) blue
  40. 40.🌈 Which colour of light is strongest in rgb(154, 9, 124)? (a) green (b) red (c) blue

Answer key

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

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