← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 114 · 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 rgb(0, 255, 255)? (a) black (b) bright green (c) red (d) cyan
  2. 2.🌈 Which colour of light is strongest in rgb(189, 10, 23)? (a) green (b) blue (c) red
  3. 3.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 4 (c) 2 (d) 6
  4. 4.🌈 Which colour is #0000ff? (a) magenta (b) blue (c) white (d) red
  5. 5.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 1000 (c) 100 (d) 255
  6. 6.🌈 In #960000 the red part is the hex number 96. What is it as a normal number?
  7. 7.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) Z (c) G (d) J
  8. 8.🌈 Which colour is #00ffff? (a) blue (b) white (c) yellow (d) cyan
  9. 9.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) black (c) blue (d) magenta
  10. 10.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) red (c) bright green (d) cyan
  11. 11.🌈 Which hex code is white? (a) #ff0000 (b) #000000 (c) #ffffff (d) #00ff00
  12. 12.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) red (d) green
  13. 13.🌈 Which colour is #ff0000? (a) blue (b) bright green (c) red (d) yellow
  14. 14.🌈 In #000087 the blue part is the hex number 87. What is it as a normal number?
  15. 15.🌈 In #4b0000 the red part is the hex number 4b. What is it as a normal number?
  16. 16.🌈 In #0000c6 the blue part is the hex number c6. What is it as a normal number?
  17. 17.🌈 In #0000db the blue part is the hex number db. What is it as a normal number?
  18. 18.🌈 Which colour of light is strongest in rgb(116, 203, 49)? (a) red (b) green (c) blue
  19. 19.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) cyan (c) red (d) magenta
  20. 20.🌈 In #009f00 the green part is the hex number 9f. What is it as a normal number?
  21. 21.🌈 Which colour of light is strongest in rgb(115, 176, 137)? (a) red (b) blue (c) green
  22. 22.🌈 Which colour of light is strongest in rgb(177, 99, 133)? (a) blue (b) green (c) red
  23. 23.🌈 Which colour is #000000? (a) cyan (b) white (c) magenta (d) black
  24. 24.🌈 Which hex code is red? (a) #ff0000 (b) #00ffff (c) #ffffff (d) #000000
  25. 25.🌈 Which colour is #ffffff? (a) bright green (b) white (c) magenta (d) cyan
  26. 26.🌈 Which colour is #00ff00? (a) magenta (b) blue (c) yellow (d) bright green
  27. 27.🌈 Which colour of light is strongest in rgb(243, 115, 43)? (a) blue (b) red (c) green
  28. 28.🌈 Which hex code is yellow? (a) #0000ff (b) #00ff00 (c) #ff0000 (d) #ffff00
  29. 29.🌈 Which colour of light is strongest in rgb(87, 76, 220)? (a) green (b) blue (c) red
  30. 30.🌈 In #00f900 the green part is the hex number f9. What is it as a normal number?
  31. 31.🌈 In #ce0000 the red part is the hex number ce. What is it as a normal number?
  32. 32.🌈 Which colour of light is strongest in rgb(77, 23, 232)? (a) blue (b) red (c) green
  33. 33.🌈 In #740000 the red part is the hex number 74. What is it as a normal number?
  34. 34.🌈 Which hex code is black? (a) #ff0000 (b) #ffffff (c) #000000 (d) #ff00ff
  35. 35.🌈 In #003b00 the green part is the hex number 3b. What is it as a normal number?
  36. 36.🌈 Which colour is rgb(255, 255, 255)? (a) bright green (b) blue (c) cyan (d) white
  37. 37.🌈 Which colour of light is strongest in rgb(197, 3, 70)? (a) red (b) green (c) blue
  38. 38.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) bright green (c) red (d) magenta
  39. 39.🌈 Which colour is #ff00ff? (a) bright green (b) white (c) red (d) magenta
  40. 40.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) white (d) blue

Answer key

  1. cyan
  2. red
  3. 3
  4. blue
  5. 255
  6. 150
  7. F
  8. cyan
  9. blue
  10. yellow
  11. #ffffff
  12. red
  13. red
  14. 135
  15. 75
  16. 198
  17. 219
  18. green
  19. magenta
  20. 159
  21. green
  22. red
  23. black
  24. #ff0000
  25. white
  26. bright green
  27. red
  28. #ffff00
  29. blue
  30. 249
  31. 206
  32. blue
  33. 116
  34. #000000
  35. 59
  36. white
  37. red
  38. bright green
  39. magenta
  40. blue

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