← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 169 · 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, 0, 0)? (a) black (b) red (c) magenta (d) white
  2. 2.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) red (c) blue (d) yellow
  3. 3.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) magenta (c) bright green (d) cyan
  4. 4.🌈 Which colour is #00ff00? (a) magenta (b) cyan (c) white (d) bright green
  5. 5.🌈 Which hex code is red? (a) #ffffff (b) #00ff00 (c) #000000 (d) #ff0000
  6. 6.🌈 Which colour of light is strongest in rgb(244, 98, 117)? (a) red (b) green (c) blue
  7. 7.🌈 Which colour is #ffffff? (a) yellow (b) white (c) blue (d) magenta
  8. 8.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) J (d) F
  9. 9.🌈 Which hex code is blue? (a) #00ffff (b) #0000ff (c) #00ff00 (d) #ffff00
  10. 10.🌈 In #fb0000 the red part is the hex number fb. What is it as a normal number?
  11. 11.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) white (d) blue
  12. 12.🌈 In #6b0000 the red part is the hex number 6b. What is it as a normal number?
  13. 13.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 6 (d) 2
  14. 14.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) red (d) blue
  15. 15.🌈 Which colour of light is strongest in rgb(175, 138, 120)? (a) green (b) red (c) blue
  16. 16.🌈 In #000060 the blue part is the hex number 60. What is it as a normal number?
  17. 17.🌈 In #00a300 the green part is the hex number a3. What is it as a normal number?
  18. 18.🌈 In #0000f7 the blue part is the hex number f7. What is it as a normal number?
  19. 19.🌈 In #00d200 the green part is the hex number d2. What is it as a normal number?
  20. 20.🌈 In #000005 the blue part is the hex number 05. What is it as a normal number?
  21. 21.🌈 Which colour of light is strongest in rgb(195, 123, 29)? (a) blue (b) green (c) red
  22. 22.🌈 In #00a800 the green part is the hex number a8. What is it as a normal number?
  23. 23.🌈 Which colour is #00ffff? (a) magenta (b) black (c) yellow (d) cyan
  24. 24.🌈 Which colour of light is strongest in rgb(113, 187, 65)? (a) red (b) blue (c) green
  25. 25.🌈 In #310000 the red part is the hex number 31. What is it as a normal number?
  26. 26.🌈 In #00007a the blue part is the hex number 7a. What is it as a normal number?
  27. 27.🌈 Which colour of light is strongest in rgb(10, 152, 46)? (a) blue (b) red (c) green
  28. 28.🌈 In #00af00 the green part is the hex number af. What is it as a normal number?
  29. 29.🌈 Which colour is #ff0000? (a) bright green (b) magenta (c) blue (d) red
  30. 30.🌈 Which colour of light is strongest in rgb(36, 120, 155)? (a) red (b) green (c) blue
  31. 31.🌈 Which colour is #ffff00? (a) bright green (b) red (c) black (d) yellow
  32. 32.🌈 In #006f00 the green part is the hex number 6f. What is it as a normal number?
  33. 33.🌈 In #000008 the blue part is the hex number 08. What is it as a normal number?
  34. 34.🌈 Which colour is #000000? (a) black (b) magenta (c) white (d) blue
  35. 35.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) blue (c) black (d) red
  36. 36.🌈 Which hex code is bright green? (a) #00ffff (b) #ff00ff (c) #ff0000 (d) #00ff00
  37. 37.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 255 (d) 99
  38. 38.🌈 Which colour of light is strongest in rgb(214, 78, 71)? (a) green (b) red (c) blue
  39. 39.🌈 Which colour of light is strongest in rgb(126, 181, 66)? (a) red (b) green (c) blue
  40. 40.🌈 Which colour is #0000ff? (a) bright green (b) magenta (c) blue (d) red

Answer key

  1. black
  2. red
  3. blue
  4. bright green
  5. #ff0000
  6. red
  7. white
  8. F
  9. #0000ff
  10. 251
  11. blue
  12. 107
  13. 3
  14. red
  15. red
  16. 96
  17. 163
  18. 247
  19. 210
  20. 5
  21. red
  22. 168
  23. cyan
  24. green
  25. 49
  26. 122
  27. green
  28. 175
  29. red
  30. blue
  31. yellow
  32. 111
  33. 8
  34. black
  35. bright green
  36. #00ff00
  37. 255
  38. red
  39. green
  40. blue

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