← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 231 · 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 hex code is black? (a) #000000 (b) #00ff00 (c) #0000ff (d) #ffff00
  2. 2.🌈 Which colour of light is strongest in rgb(51, 173, 37)? (a) red (b) blue (c) green
  3. 3.🌈 Which colour is rgb(255, 0, 0)? (a) white (b) red (c) yellow (d) black
  4. 4.🌈 Which hex code is bright green? (a) #000000 (b) #00ffff (c) #ff00ff (d) #00ff00
  5. 5.🌈 In #000000 the red part is the hex number 00. What is it as a normal number?
  6. 6.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) black (d) blue
  7. 7.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) J (d) Z
  8. 8.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 2 (d) 4
  9. 9.🌈 Which colour is #ff0000? (a) white (b) blue (c) red (d) magenta
  10. 10.🌈 Which hex code is white? (a) #00ffff (b) #ffff00 (c) #ffffff (d) #000000
  11. 11.🌈 In #008b00 the green part is the hex number 8b. What is it as a normal number?
  12. 12.🌈 Which hex code is magenta? (a) #ff0000 (b) #000000 (c) #ff00ff (d) #ffff00
  13. 13.🌈 In #000049 the blue part is the hex number 49. What is it as a normal number?
  14. 14.🌈 Which colour is #0000ff? (a) white (b) black (c) blue (d) red
  15. 15.🌈 Which colour is rgb(255, 0, 255)? (a) blue (b) magenta (c) cyan (d) red
  16. 16.🌈 Which colour is #00ff00? (a) blue (b) cyan (c) magenta (d) bright green
  17. 17.🌈 Which colour of light is strongest in rgb(83, 79, 237)? (a) green (b) blue (c) red
  18. 18.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) black (c) red (d) yellow
  19. 19.🌈 Which colour of light is strongest in rgb(4, 225, 4)? (a) blue (b) green (c) red
  20. 20.🌈 Which colour is #ff00ff? (a) yellow (b) magenta (c) bright green (d) red
  21. 21.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 255 (d) 1000
  22. 22.🌈 Which hex code is yellow? (a) #ffffff (b) #ffff00 (c) #ff0000 (d) #00ffff
  23. 23.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) black (c) blue (d) yellow
  24. 24.🌈 Which colour is #ffffff? (a) magenta (b) bright green (c) red (d) white
  25. 25.🌈 Which colour is #ffff00? (a) blue (b) yellow (c) bright green (d) magenta
  26. 26.🌈 Which colour is #000000? (a) red (b) black (c) cyan (d) magenta
  27. 27.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) green (c) white (d) red
  28. 28.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) white (c) blue (d) cyan
  29. 29.🌈 In #00009b the blue part is the hex number 9b. What is it as a normal number?
  30. 30.🌈 Which colour is rgb(255, 255, 255)? (a) red (b) white (c) black (d) bright green
  31. 31.🌈 In #930000 the red part is the hex number 93. What is it as a normal number?
  32. 32.🌈 In #360000 the red part is the hex number 36. What is it as a normal number?
  33. 33.🌈 Which colour of light is strongest in rgb(86, 71, 239)? (a) red (b) green (c) blue
  34. 34.🌈 Which hex code is blue? (a) #00ffff (b) #000000 (c) #0000ff (d) #ff0000
  35. 35.🌈 In #830000 the red part is the hex number 83. What is it as a normal number?
  36. 36.🌈 Which colour of light is strongest in rgb(241, 100, 15)? (a) blue (b) red (c) green
  37. 37.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) red (c) yellow (d) cyan
  38. 38.🌈 Which colour of light is strongest in rgb(57, 212, 28)? (a) blue (b) green (c) red
  39. 39.🌈 In #b00000 the red part is the hex number b0. What is it as a normal number?
  40. 40.🌈 Which colour of light is strongest in rgb(8, 134, 226)? (a) green (b) blue (c) red

Answer key

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

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