← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 323 · 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 #0000ff? (a) magenta (b) cyan (c) white (d) blue
  2. 2.🌈 Which colour of light is strongest in rgb(246, 44, 123)? (a) blue (b) red (c) green
  3. 3.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) green (d) black
  4. 4.🌈 In #000009 the blue part is the hex number 09. What is it as a normal number?
  5. 5.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) blue (d) green
  6. 6.🌈 In #006700 the green part is the hex number 67. What is it as a normal number?
  7. 7.🌈 Which colour is rgb(0, 255, 255)? (a) magenta (b) yellow (c) black (d) cyan
  8. 8.🌈 Which hex code is magenta? (a) #ff00ff (b) #00ff00 (c) #0000ff (d) #ff0000
  9. 9.🌈 Which colour is #ffffff? (a) bright green (b) white (c) magenta (d) red
  10. 10.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 3 (d) 2
  11. 11.🌈 In #810000 the red part is the hex number 81. What is it as a normal number?
  12. 12.🌈 Which hex code is blue? (a) #ffffff (b) #0000ff (c) #ff00ff (d) #00ff00
  13. 13.🌈 Which hex code is yellow? (a) #0000ff (b) #ff0000 (c) #ffff00 (d) #ffffff
  14. 14.🌈 Which colour is #00ffff? (a) cyan (b) magenta (c) red (d) black
  15. 15.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) blue (c) red (d) black
  16. 16.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) J (d) Z
  17. 17.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 1000 (d) 100
  18. 18.🌈 Which colour is rgb(255, 0, 255)? (a) cyan (b) black (c) magenta (d) red
  19. 19.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) blue (c) red (d) bright green
  20. 20.🌈 Which colour is #000000? (a) magenta (b) black (c) white (d) red
  21. 21.🌈 Which hex code is white? (a) #ffffff (b) #0000ff (c) #000000 (d) #00ff00
  22. 22.🌈 Which hex code is cyan? (a) #00ff00 (b) #ff00ff (c) #00ffff (d) #0000ff
  23. 23.🌈 In #b30000 the red part is the hex number b3. What is it as a normal number?
  24. 24.🌈 In #000003 the blue part is the hex number 03. What is it as a normal number?
  25. 25.🌈 In #00cf00 the green part is the hex number cf. What is it as a normal number?
  26. 26.🌈 Which colour of light is strongest in rgb(214, 90, 19)? (a) green (b) red (c) blue
  27. 27.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) bright green (c) blue (d) black
  28. 28.🌈 In #220000 the red part is the hex number 22. What is it as a normal number?
  29. 29.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) yellow (c) blue (d) cyan
  30. 30.🌈 In #004c00 the green part is the hex number 4c. What is it as a normal number?
  31. 31.🌈 Which colour of light is strongest in rgb(138, 183, 125)? (a) green (b) blue (c) red
  32. 32.🌈 Which colour of light is strongest in rgb(228, 23, 50)? (a) red (b) blue (c) green
  33. 33.🌈 Which hex code is red? (a) #0000ff (b) #ff0000 (c) #00ff00 (d) #000000
  34. 34.🌈 In #008800 the green part is the hex number 88. What is it as a normal number?
  35. 35.🌈 Which colour of light is strongest in rgb(241, 64, 59)? (a) red (b) green (c) blue
  36. 36.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) yellow (c) black (d) magenta
  37. 37.🌈 Which colour of light is strongest in rgb(34, 194, 95)? (a) blue (b) red (c) green
  38. 38.🌈 Which colour of light is strongest in rgb(136, 213, 49)? (a) blue (b) red (c) green
  39. 39.🌈 Which colour of light is strongest in rgb(179, 99, 116)? (a) green (b) blue (c) red
  40. 40.🌈 Which hex code is bright green? (a) #00ff00 (b) #ff00ff (c) #ffff00 (d) #00ffff

Answer key

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

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