← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 161 · 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 blue? (a) #00ff00 (b) #0000ff (c) #ffff00 (d) #ffffff
  2. 2.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) F (d) G
  3. 3.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 100 (d) 1000
  4. 4.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) white (c) red (d) green
  5. 5.🌈 Which colour of light is strongest in rgb(231, 111, 48)? (a) red (b) blue (c) green
  6. 6.🌈 In #000054 the blue part is the hex number 54. What is it as a normal number?
  7. 7.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 3 (d) 2
  8. 8.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) red (d) green
  9. 9.🌈 Which hex code is magenta? (a) #ffffff (b) #ff00ff (c) #00ffff (d) #00ff00
  10. 10.🌈 Which colour is #ff00ff? (a) yellow (b) black (c) magenta (d) blue
  11. 11.🌈 Which hex code is red? (a) #ffffff (b) #00ffff (c) #ff0000 (d) #00ff00
  12. 12.🌈 Which colour of light is strongest in rgb(239, 3, 138)? (a) blue (b) green (c) red
  13. 13.🌈 In #5a0000 the red part is the hex number 5a. What is it as a normal number?
  14. 14.🌈 Which colour is #00ff00? (a) yellow (b) blue (c) bright green (d) magenta
  15. 15.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) bright green (c) white (d) blue
  16. 16.🌈 Which colour of light is strongest in rgb(7, 226, 139)? (a) green (b) red (c) blue
  17. 17.🌈 In #0000f2 the blue part is the hex number f2. What is it as a normal number?
  18. 18.🌈 Which colour of light is strongest in rgb(25, 226, 79)? (a) red (b) green (c) blue
  19. 19.🌈 In #220000 the red part is the hex number 22. What is it as a normal number?
  20. 20.🌈 In #00a300 the green part is the hex number a3. What is it as a normal number?
  21. 21.🌈 Which colour of light is strongest in rgb(96, 33, 152)? (a) red (b) blue (c) green
  22. 22.🌈 Which colour of light is strongest in rgb(103, 220, 19)? (a) blue (b) green (c) red
  23. 23.🌈 Which colour of light is strongest in rgb(219, 68, 75)? (a) red (b) blue (c) green
  24. 24.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) red (c) cyan (d) magenta
  25. 25.🌈 In #0d0000 the red part is the hex number 0d. What is it as a normal number?
  26. 26.🌈 Which colour of light is strongest in rgb(23, 154, 87)? (a) blue (b) red (c) green
  27. 27.🌈 Which colour is #000000? (a) blue (b) yellow (c) black (d) red
  28. 28.🌈 Which colour is #00ffff? (a) magenta (b) bright green (c) cyan (d) yellow
  29. 29.🌈 Which colour of light is strongest in rgb(57, 6, 202)? (a) red (b) blue (c) green
  30. 30.🌈 Which hex code is cyan? (a) #ff0000 (b) #0000ff (c) #00ff00 (d) #00ffff
  31. 31.🌈 Which hex code is white? (a) #00ffff (b) #ff0000 (c) #ffffff (d) #ff00ff
  32. 32.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) bright green (c) white (d) magenta
  33. 33.🌈 Which colour is #ffffff? (a) blue (b) white (c) bright green (d) magenta
  34. 34.🌈 In #3e0000 the red part is the hex number 3e. What is it as a normal number?
  35. 35.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) yellow (c) red (d) white
  36. 36.🌈 Which hex code is black? (a) #ffffff (b) #000000 (c) #00ffff (d) #0000ff
  37. 37.🌈 In #3c0000 the red part is the hex number 3c. What is it as a normal number?
  38. 38.🌈 Which hex code is bright green? (a) #00ff00 (b) #ffffff (c) #ff0000 (d) #0000ff
  39. 39.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) magenta (c) black (d) bright green
  40. 40.🌈 Which colour of light is strongest in rgb(99, 169, 18)? (a) red (b) blue (c) green

Answer key

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

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