← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 168 · 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(253, 23, 27)? (a) green (b) blue (c) red
  2. 2.🌈 Which colour is #ff0000? (a) red (b) bright green (c) magenta (d) blue
  3. 3.🌈 Which colour is rgb(255, 0, 255)? (a) cyan (b) yellow (c) magenta (d) black
  4. 4.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) white (c) blue (d) cyan
  5. 5.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) cyan (c) yellow (d) blue
  6. 6.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) blue (d) green
  7. 7.🌈 Which hex code is yellow? (a) #00ffff (b) #000000 (c) #ff0000 (d) #ffff00
  8. 8.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) cyan (c) magenta (d) white
  9. 9.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) bright green (c) black (d) cyan
  10. 10.🌈 Which colour is rgb(0, 0, 0)? (a) blue (b) yellow (c) magenta (d) black
  11. 11.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 99 (c) 100 (d) 255
  12. 12.🌈 Which colour is #000000? (a) bright green (b) yellow (c) black (d) red
  13. 13.🌈 Which colour of light is strongest in rgb(16, 43, 201)? (a) green (b) red (c) blue
  14. 14.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) blue (c) black (d) yellow
  15. 15.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) blue (d) white
  16. 16.🌈 In #00002a the blue part is the hex number 2a. What is it as a normal number?
  17. 17.🌈 Which colour of light is strongest in rgb(16, 209, 100)? (a) blue (b) green (c) red
  18. 18.🌈 In #0000b8 the blue part is the hex number b8. What is it as a normal number?
  19. 19.🌈 Which colour is #ff00ff? (a) black (b) magenta (c) blue (d) cyan
  20. 20.🌈 Which colour of light is strongest in rgb(158, 20, 114)? (a) blue (b) red (c) green
  21. 21.🌈 Which colour is rgb(0, 255, 0)? (a) cyan (b) red (c) bright green (d) white
  22. 22.🌈 In #006500 the green part is the hex number 65. What is it as a normal number?
  23. 23.🌈 Which colour of light is strongest in rgb(28, 0, 195)? (a) green (b) blue (c) red
  24. 24.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 4 (d) 2
  25. 25.🌈 Which colour is #00ffff? (a) magenta (b) red (c) cyan (d) black
  26. 26.🌈 Which hex code is red? (a) #ff0000 (b) #00ff00 (c) #ff00ff (d) #00ffff
  27. 27.🌈 In #0000bb the blue part is the hex number bb. What is it as a normal number?
  28. 28.🌈 In #5f0000 the red part is the hex number 5f. What is it as a normal number?
  29. 29.🌈 Which hex code is cyan? (a) #ffff00 (b) #ff0000 (c) #00ffff (d) #0000ff
  30. 30.🌈 Which colour is #0000ff? (a) blue (b) yellow (c) bright green (d) cyan
  31. 31.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) G (d) F
  32. 32.🌈 In #003300 the green part is the hex number 33. What is it as a normal number?
  33. 33.🌈 Which colour of light is strongest in rgb(238, 104, 98)? (a) blue (b) red (c) green
  34. 34.🌈 In #000100 the green part is the hex number 01. What is it as a normal number?
  35. 35.🌈 Which colour is #ffff00? (a) white (b) blue (c) bright green (d) yellow
  36. 36.🌈 Which hex code is white? (a) #00ffff (b) #ffffff (c) #ffff00 (d) #00ff00
  37. 37.🌈 Which colour is #ffffff? (a) blue (b) bright green (c) white (d) cyan
  38. 38.🌈 In #0000ad the blue part is the hex number ad. What is it as a normal number?
  39. 39.🌈 Which colour of light is strongest in rgb(0, 95, 180)? (a) green (b) red (c) blue
  40. 40.🌈 Which colour of light is strongest in rgb(127, 247, 14)? (a) blue (b) red (c) green

Answer key

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

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