← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 143 · 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 #e60000 the red part is the hex number e6. What is it as a normal number?
  2. 2.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) black (d) green
  3. 3.🌈 Which colour is #ffffff? (a) magenta (b) blue (c) red (d) white
  4. 4.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) F (d) G
  5. 5.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) blue (c) cyan (d) white
  6. 6.🌈 Which colour of light is strongest in rgb(94, 153, 77)? (a) blue (b) red (c) green
  7. 7.🌈 Which colour of light is strongest in rgb(151, 70, 93)? (a) green (b) blue (c) red
  8. 8.🌈 In #00b900 the green part is the hex number b9. What is it as a normal number?
  9. 9.🌈 In #00000b the blue part is the hex number 0b. What is it as a normal number?
  10. 10.🌈 Which colour of light is strongest in rgb(57, 99, 227)? (a) red (b) blue (c) green
  11. 11.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 99 (d) 255
  12. 12.🌈 Which colour of light is strongest in rgb(222, 9, 15)? (a) green (b) blue (c) red
  13. 13.🌈 Which colour of light is strongest in rgb(165, 33, 63)? (a) green (b) blue (c) red
  14. 14.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 2 (d) 6
  15. 15.🌈 Which hex code is black? (a) #00ff00 (b) #ff00ff (c) #ff0000 (d) #000000
  16. 16.🌈 Which colour of light is strongest in rgb(9, 95, 176)? (a) green (b) blue (c) red
  17. 17.🌈 Which colour is #0000ff? (a) white (b) blue (c) black (d) red
  18. 18.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) white (c) blue (d) green
  19. 19.🌈 Which colour of light is strongest in rgb(38, 105, 161)? (a) red (b) green (c) blue
  20. 20.🌈 In #2d0000 the red part is the hex number 2d. What is it as a normal number?
  21. 21.🌈 Which colour is rgb(0, 255, 255)? (a) red (b) blue (c) cyan (d) yellow
  22. 22.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) bright green (c) red (d) yellow
  23. 23.🌈 Which hex code is bright green? (a) #ff0000 (b) #000000 (c) #00ff00 (d) #0000ff
  24. 24.🌈 Which hex code is white? (a) #ff0000 (b) #00ff00 (c) #ffffff (d) #0000ff
  25. 25.🌈 Which colour is #00ffff? (a) yellow (b) red (c) cyan (d) white
  26. 26.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) black (c) white (d) red
  27. 27.🌈 In #d30000 the red part is the hex number d3. What is it as a normal number?
  28. 28.🌈 Which hex code is blue? (a) #ffff00 (b) #0000ff (c) #ffffff (d) #00ff00
  29. 29.🌈 Which colour of light is strongest in rgb(224, 30, 5)? (a) red (b) green (c) blue
  30. 30.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) blue (c) bright green (d) red
  31. 31.🌈 In #000051 the blue part is the hex number 51. What is it as a normal number?
  32. 32.🌈 Which colour is #000000? (a) cyan (b) magenta (c) white (d) black
  33. 33.🌈 Which colour of light is strongest in rgb(122, 212, 63)? (a) green (b) red (c) blue
  34. 34.🌈 In #004700 the green part is the hex number 47. What is it as a normal number?
  35. 35.🌈 Which colour is #00ff00? (a) black (b) blue (c) red (d) bright green
  36. 36.🌈 Which colour is #ff0000? (a) white (b) red (c) black (d) blue
  37. 37.🌈 In #9e0000 the red part is the hex number 9e. What is it as a normal number?
  38. 38.🌈 In #a00000 the red part is the hex number a0. What is it as a normal number?
  39. 39.🌈 Which colour of light is strongest in rgb(124, 109, 220)? (a) blue (b) red (c) green
  40. 40.🌈 In #00a400 the green part is the hex number a4. What is it as a normal number?

Answer key

  1. 230
  2. red
  3. white
  4. F
  5. bright green
  6. green
  7. red
  8. 185
  9. 11
  10. blue
  11. 255
  12. red
  13. red
  14. 3
  15. #000000
  16. blue
  17. blue
  18. blue
  19. blue
  20. 45
  21. cyan
  22. magenta
  23. #00ff00
  24. #ffffff
  25. cyan
  26. red
  27. 211
  28. #0000ff
  29. red
  30. white
  31. 81
  32. black
  33. green
  34. 71
  35. bright green
  36. red
  37. 158
  38. 160
  39. blue
  40. 164

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