← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 139 · 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 #00006e the blue part is the hex number 6e. What is it as a normal number?
  2. 2.🌈 Which colour of light is strongest in rgb(240, 52, 55)? (a) blue (b) green (c) red
  3. 3.🌈 In #000051 the blue part is the hex number 51. What is it as a normal number?
  4. 4.🌈 Which hex code is yellow? (a) #0000ff (b) #ffffff (c) #ffff00 (d) #ff0000
  5. 5.🌈 Which colour is #00ff00? (a) yellow (b) red (c) blue (d) bright green
  6. 6.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) red (d) green
  7. 7.🌈 Which colour of light is strongest in rgb(210, 0, 114)? (a) red (b) green (c) blue
  8. 8.🌈 Which colour of light is strongest in rgb(134, 127, 205)? (a) green (b) blue (c) red
  9. 9.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) red (c) bright green (d) white
  10. 10.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) white (c) magenta (d) black
  11. 11.🌈 Which colour is rgb(255, 255, 0)? (a) black (b) bright green (c) cyan (d) yellow
  12. 12.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 4 (d) 6
  13. 13.🌈 Which colour is #ffff00? (a) red (b) white (c) yellow (d) cyan
  14. 14.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 255 (c) 99 (d) 100
  15. 15.🌈 Which hex code is bright green? (a) #ff00ff (b) #ffff00 (c) #00ff00 (d) #ff0000
  16. 16.🌈 In #007d00 the green part is the hex number 7d. What is it as a normal number?
  17. 17.🌈 In #820000 the red part is the hex number 82. What is it as a normal number?
  18. 18.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) blue (d) red
  19. 19.🌈 Which colour of light is strongest in rgb(255, 108, 73)? (a) blue (b) red (c) green
  20. 20.🌈 Which colour is #ffffff? (a) bright green (b) blue (c) white (d) black
  21. 21.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) G (d) F
  22. 22.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) blue (c) bright green (d) cyan
  23. 23.🌈 Which colour of light is strongest in rgb(80, 62, 208)? (a) green (b) red (c) blue
  24. 24.🌈 In #e00000 the red part is the hex number e0. What is it as a normal number?
  25. 25.🌈 Which colour of light is strongest in rgb(177, 101, 56)? (a) blue (b) red (c) green
  26. 26.🌈 In #000006 the blue part is the hex number 06. What is it as a normal number?
  27. 27.🌈 In #ea0000 the red part is the hex number ea. What is it as a normal number?
  28. 28.🌈 Which colour is #00ffff? (a) blue (b) black (c) cyan (d) bright green
  29. 29.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) bright green (c) yellow (d) red
  30. 30.🌈 In #008f00 the green part is the hex number 8f. What is it as a normal number?
  31. 31.🌈 Which colour is #ff0000? (a) blue (b) red (c) bright green (d) yellow
  32. 32.🌈 In #c20000 the red part is the hex number c2. What is it as a normal number?
  33. 33.🌈 Which hex code is red? (a) #0000ff (b) #00ffff (c) #ff0000 (d) #ff00ff
  34. 34.🌈 Which colour of light is strongest in rgb(170, 79, 75)? (a) red (b) green (c) blue
  35. 35.🌈 In #0000b0 the blue part is the hex number b0. What is it as a normal number?
  36. 36.🌈 In #3b0000 the red part is the hex number 3b. What is it as a normal number?
  37. 37.🌈 Which colour of light is strongest in rgb(254, 129, 42)? (a) green (b) red (c) blue
  38. 38.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) cyan (c) white (d) yellow
  39. 39.🌈 Which colour of light is strongest in rgb(181, 9, 68)? (a) green (b) blue (c) red
  40. 40.🌈 Which colour is #0000ff? (a) bright green (b) magenta (c) yellow (d) blue

Answer key

  1. 110
  2. red
  3. 81
  4. #ffff00
  5. bright green
  6. blue
  7. red
  8. blue
  9. red
  10. white
  11. yellow
  12. 3
  13. yellow
  14. 255
  15. #00ff00
  16. 125
  17. 130
  18. red
  19. red
  20. white
  21. F
  22. bright green
  23. blue
  24. 224
  25. red
  26. 6
  27. 234
  28. cyan
  29. magenta
  30. 143
  31. red
  32. 194
  33. #ff0000
  34. red
  35. 176
  36. 59
  37. red
  38. cyan
  39. red
  40. blue

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