← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 177 · 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 red? (a) #00ff00 (b) #ff0000 (c) #ffffff (d) #ff00ff
  2. 2.🌈 Which hex code is black? (a) #00ffff (b) #000000 (c) #ff0000 (d) #00ff00
  3. 3.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) white (c) yellow (d) red
  4. 4.🌈 Which colour is #0000ff? (a) blue (b) yellow (c) bright green (d) cyan
  5. 5.🌈 Which hex code is bright green? (a) #00ffff (b) #000000 (c) #ffffff (d) #00ff00
  6. 6.🌈 In #008000 the green part is the hex number 80. What is it as a normal number?
  7. 7.🌈 In #00d000 the green part is the hex number d0. What is it as a normal number?
  8. 8.🌈 Which colour is #ffff00? (a) blue (b) red (c) black (d) yellow
  9. 9.🌈 Which colour is #ff0000? (a) cyan (b) yellow (c) white (d) red
  10. 10.🌈 Which hex code is yellow? (a) #0000ff (b) #ffff00 (c) #00ffff (d) #00ff00
  11. 11.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) black (d) red
  12. 12.🌈 In #0000c3 the blue part is the hex number c3. What is it as a normal number?
  13. 13.🌈 Which colour of light is strongest in rgb(232, 31, 34)? (a) green (b) blue (c) red
  14. 14.🌈 In #009500 the green part is the hex number 95. What is it as a normal number?
  15. 15.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) yellow (c) cyan (d) magenta
  16. 16.🌈 In #000037 the blue part is the hex number 37. What is it as a normal number?
  17. 17.🌈 Which colour of light is strongest in rgb(31, 32, 150)? (a) red (b) blue (c) green
  18. 18.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 2 (c) 3 (d) 4
  19. 19.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) black (c) cyan (d) bright green
  20. 20.🌈 In #950000 the red part is the hex number 95. What is it as a normal number?
  21. 21.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) F (c) G (d) J
  22. 22.🌈 Which hex code is blue? (a) #ff00ff (b) #000000 (c) #0000ff (d) #00ff00
  23. 23.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) blue (c) bright green (d) cyan
  24. 24.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) white (d) blue
  25. 25.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 1000 (d) 100
  26. 26.🌈 Which colour of light is strongest in rgb(210, 40, 35)? (a) blue (b) green (c) red
  27. 27.🌈 Which colour of light is strongest in rgb(227, 118, 82)? (a) green (b) red (c) blue
  28. 28.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) red (c) white (d) blue
  29. 29.🌈 Which colour of light is strongest in rgb(79, 195, 126)? (a) green (b) red (c) blue
  30. 30.🌈 In #00004e the blue part is the hex number 4e. What is it as a normal number?
  31. 31.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) black (c) blue (d) magenta
  32. 32.🌈 Which colour of light is strongest in rgb(34, 30, 150)? (a) green (b) blue (c) red
  33. 33.🌈 Which colour of light is strongest in rgb(62, 29, 252)? (a) green (b) blue (c) red
  34. 34.🌈 In #006700 the green part is the hex number 67. What is it as a normal number?
  35. 35.🌈 Which hex code is magenta? (a) #ffff00 (b) #000000 (c) #00ff00 (d) #ff00ff
  36. 36.🌈 Which colour of light is strongest in rgb(94, 241, 116)? (a) green (b) blue (c) red
  37. 37.🌈 In #00001b the blue part is the hex number 1b. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(160, 14, 21)? (a) green (b) blue (c) red
  39. 39.🌈 Which hex code is white? (a) #0000ff (b) #ffffff (c) #000000 (d) #ffff00
  40. 40.🌈 Which colour of light is strongest in rgb(200, 129, 0)? (a) blue (b) green (c) red

Answer key

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

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