← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 124 · 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 magenta? (a) #ffffff (b) #000000 (c) #ff00ff (d) #00ff00
  2. 2.🌈 In #000003 the blue part is the hex number 03. What is it as a normal number?
  3. 3.🌈 Which colour is #ff0000? (a) magenta (b) cyan (c) red (d) blue
  4. 4.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) F (c) J (d) Z
  5. 5.🌈 Which colour of light is strongest in rgb(197, 86, 15)? (a) red (b) blue (c) green
  6. 6.🌈 In #00ca00 the green part is the hex number ca. What is it as a normal number?
  7. 7.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) bright green (c) cyan (d) red
  8. 8.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 4 (d) 2
  9. 9.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 1000 (d) 99
  10. 10.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) green (d) red
  11. 11.🌈 Which colour is rgb(255, 0, 0)? (a) white (b) bright green (c) red (d) black
  12. 12.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) white (c) bright green (d) yellow
  13. 13.🌈 Which colour of light is strongest in rgb(3, 4, 212)? (a) blue (b) red (c) green
  14. 14.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) magenta (c) red (d) bright green
  15. 15.🌈 Which colour is #ffffff? (a) bright green (b) white (c) black (d) blue
  16. 16.🌈 Which colour of light is strongest in rgb(131, 253, 46)? (a) green (b) blue (c) red
  17. 17.🌈 Which colour is #0000ff? (a) black (b) yellow (c) blue (d) cyan
  18. 18.🌈 Which hex code is bright green? (a) #ffffff (b) #0000ff (c) #00ff00 (d) #000000
  19. 19.🌈 Which hex code is black? (a) #00ffff (b) #ffff00 (c) #000000 (d) #0000ff
  20. 20.🌈 Which hex code is white? (a) #ffffff (b) #ff0000 (c) #ffff00 (d) #00ffff
  21. 21.🌈 Which colour is #000000? (a) red (b) cyan (c) blue (d) black
  22. 22.🌈 Which colour of light is strongest in rgb(47, 71, 223)? (a) green (b) blue (c) red
  23. 23.🌈 Which hex code is red? (a) #ffff00 (b) #ffffff (c) #00ffff (d) #ff0000
  24. 24.🌈 In #00f200 the green part is the hex number f2. What is it as a normal number?
  25. 25.🌈 Which hex code is cyan? (a) #00ffff (b) #ff0000 (c) #00ff00 (d) #ffff00
  26. 26.🌈 Which colour is #ff00ff? (a) magenta (b) blue (c) black (d) red
  27. 27.🌈 Which colour of light is strongest in rgb(49, 43, 235)? (a) green (b) blue (c) red
  28. 28.🌈 In #420000 the red part is the hex number 42. What is it as a normal number?
  29. 29.🌈 In #00b700 the green part is the hex number b7. What is it as a normal number?
  30. 30.🌈 Which hex code is blue? (a) #0000ff (b) #000000 (c) #ffff00 (d) #00ff00
  31. 31.🌈 Which colour is #00ffff? (a) black (b) cyan (c) blue (d) magenta
  32. 32.🌈 Which colour of light is strongest in rgb(90, 21, 172)? (a) red (b) blue (c) green
  33. 33.🌈 Which colour is #ffff00? (a) yellow (b) blue (c) white (d) bright green
  34. 34.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) green (d) red
  35. 35.🌈 In #000080 the blue part is the hex number 80. What is it as a normal number?
  36. 36.🌈 Which colour of light is strongest in rgb(39, 20, 152)? (a) blue (b) red (c) green
  37. 37.🌈 Which colour of light is strongest in rgb(15, 68, 222)? (a) blue (b) red (c) green
  38. 38.🌈 In #00007f the blue part is the hex number 7f. What is it as a normal number?
  39. 39.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) black (c) yellow (d) bright green
  40. 40.🌈 Which colour of light is strongest in rgb(207, 58, 46)? (a) red (b) green (c) blue

Answer key

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

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