← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 8 · 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.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) blue (d) red
  2. 2.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 4 (d) 6
  3. 3.🌈 Which hex code is black? (a) #000000 (b) #0000ff (c) #ffff00 (d) #00ffff
  4. 4.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) green (c) white (d) red
  5. 5.🌈 In #00006d the blue part is the hex number 6d. What is it as a normal number?
  6. 6.🌈 In #00cb00 the green part is the hex number cb. What is it as a normal number?
  7. 7.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) cyan (c) bright green (d) blue
  8. 8.🌈 In #960000 the red part is the hex number 96. What is it as a normal number?
  9. 9.🌈 Which colour is #0000ff? (a) blue (b) cyan (c) black (d) white
  10. 10.🌈 Which hex code is red? (a) #ff00ff (b) #00ff00 (c) #ffffff (d) #ff0000
  11. 11.🌈 Which hex code is white? (a) #ff0000 (b) #ffffff (c) #000000 (d) #00ff00
  12. 12.🌈 In #00007d the blue part is the hex number 7d. What is it as a normal number?
  13. 13.🌈 In #00003d the blue part is the hex number 3d. What is it as a normal number?
  14. 14.🌈 Which colour is #ff0000? (a) bright green (b) black (c) yellow (d) red
  15. 15.🌈 In #009100 the green part is the hex number 91. What is it as a normal number?
  16. 16.🌈 Which colour is #000000? (a) white (b) red (c) bright green (d) black
  17. 17.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) magenta (c) blue (d) cyan
  18. 18.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) cyan (c) yellow (d) white
  19. 19.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) red (c) bright green (d) magenta
  20. 20.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) F (c) J (d) Z
  21. 21.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) magenta (c) bright green (d) white
  22. 22.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 1000 (d) 100
  23. 23.🌈 In #0000a0 the blue part is the hex number a0. What is it as a normal number?
  24. 24.🌈 Which hex code is blue? (a) #00ffff (b) #0000ff (c) #000000 (d) #00ff00
  25. 25.🌈 Which colour of light is strongest in rgb(175, 96, 88)? (a) green (b) blue (c) red
  26. 26.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) black (c) blue (d) cyan
  27. 27.🌈 Which colour of light is strongest in rgb(32, 12, 197)? (a) green (b) blue (c) red
  28. 28.🌈 In #d80000 the red part is the hex number d8. What is it as a normal number?
  29. 29.🌈 In #0000b8 the blue part is the hex number b8. What is it as a normal number?
  30. 30.🌈 Which colour of light is strongest in rgb(39, 171, 111)? (a) blue (b) red (c) green
  31. 31.🌈 Which hex code is cyan? (a) #ff00ff (b) #ff0000 (c) #ffff00 (d) #00ffff
  32. 32.🌈 Which colour is #00ffff? (a) cyan (b) yellow (c) magenta (d) red
  33. 33.🌈 Which hex code is bright green? (a) #00ff00 (b) #ff0000 (c) #0000ff (d) #000000
  34. 34.🌈 Which colour of light is strongest in rgb(150, 79, 54)? (a) red (b) green (c) blue
  35. 35.🌈 In #a00000 the red part is the hex number a0. What is it as a normal number?
  36. 36.🌈 Which colour of light is strongest in rgb(34, 209, 29)? (a) blue (b) green (c) red
  37. 37.🌈 In #000099 the blue part is the hex number 99. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(212, 52, 136)? (a) green (b) blue (c) red
  39. 39.🌈 Which colour of light is strongest in rgb(114, 174, 94)? (a) blue (b) green (c) red
  40. 40.🌈 Which colour of light is strongest in rgb(238, 43, 135)? (a) green (b) red (c) blue

Answer key

  1. red
  2. 3
  3. #000000
  4. blue
  5. 109
  6. 203
  7. blue
  8. 150
  9. blue
  10. #ff0000
  11. #ffffff
  12. 125
  13. 61
  14. red
  15. 145
  16. black
  17. black
  18. yellow
  19. magenta
  20. F
  21. bright green
  22. 255
  23. 160
  24. #0000ff
  25. red
  26. cyan
  27. blue
  28. 216
  29. 184
  30. green
  31. #00ffff
  32. cyan
  33. #00ff00
  34. red
  35. 160
  36. green
  37. 153
  38. red
  39. green
  40. red

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