← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 355 · 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 last two digits give? (a) green (b) blue (c) white (d) red
  2. 2.🌈 In #003a00 the green part is the hex number 3a. What is it as a normal number?
  3. 3.🌈 In #000036 the blue part is the hex number 36. What is it as a normal number?
  4. 4.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) Z (d) J
  5. 5.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) red (d) green
  6. 6.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 1000 (d) 100
  7. 7.🌈 Which colour of light is strongest in rgb(34, 56, 231)? (a) red (b) blue (c) green
  8. 8.🌈 Which colour is #000000? (a) white (b) black (c) magenta (d) yellow
  9. 9.🌈 Which colour of light is strongest in rgb(213, 75, 84)? (a) red (b) green (c) blue
  10. 10.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) red (c) magenta (d) cyan
  11. 11.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) cyan (c) red (d) magenta
  12. 12.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) yellow (c) black (d) bright green
  13. 13.🌈 Which hex code is bright green? (a) #ffff00 (b) #000000 (c) #ff0000 (d) #00ff00
  14. 14.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) yellow (c) cyan (d) white
  15. 15.🌈 Which colour is #ffff00? (a) cyan (b) red (c) yellow (d) black
  16. 16.🌈 In #00f200 the green part is the hex number f2. What is it as a normal number?
  17. 17.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 2 (d) 3
  18. 18.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) bright green (c) blue (d) red
  19. 19.🌈 In #003e00 the green part is the hex number 3e. What is it as a normal number?
  20. 20.🌈 In #5e0000 the red part is the hex number 5e. What is it as a normal number?
  21. 21.🌈 Which colour is #ff0000? (a) white (b) red (c) magenta (d) blue
  22. 22.🌈 Which hex code is black? (a) #ffff00 (b) #ff0000 (c) #000000 (d) #ff00ff
  23. 23.🌈 In #be0000 the red part is the hex number be. What is it as a normal number?
  24. 24.🌈 Which colour is #00ffff? (a) cyan (b) black (c) red (d) blue
  25. 25.🌈 Which colour is #0000ff? (a) blue (b) red (c) yellow (d) cyan
  26. 26.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) red (c) yellow (d) white
  27. 27.🌈 Which colour of light is strongest in rgb(175, 55, 51)? (a) blue (b) red (c) green
  28. 28.🌈 In #006400 the green part is the hex number 64. 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.🌈 In #00be00 the green part is the hex number be. What is it as a normal number?
  31. 31.🌈 Which hex code is cyan? (a) #000000 (b) #ff00ff (c) #00ffff (d) #ff0000
  32. 32.🌈 Which colour of light is strongest in rgb(21, 216, 10)? (a) red (b) green (c) blue
  33. 33.🌈 Which colour of light is strongest in rgb(36, 24, 251)? (a) green (b) blue (c) red
  34. 34.🌈 In #00f700 the green part is the hex number f7. What is it as a normal number?
  35. 35.🌈 Which hex code is red? (a) #00ff00 (b) #ff0000 (c) #00ffff (d) #0000ff
  36. 36.🌈 In #320000 the red part is the hex number 32. What is it as a normal number?
  37. 37.🌈 Which colour of light is strongest in rgb(66, 232, 30)? (a) red (b) blue (c) green
  38. 38.🌈 Which hex code is yellow? (a) #00ffff (b) #ff0000 (c) #ffff00 (d) #000000
  39. 39.🌈 Which hex code is magenta? (a) #ffffff (b) #ffff00 (c) #ff00ff (d) #ff0000
  40. 40.🌈 Which colour of light is strongest in rgb(97, 119, 191)? (a) green (b) blue (c) red

Answer key

  1. blue
  2. 58
  3. 54
  4. F
  5. red
  6. 255
  7. blue
  8. black
  9. red
  10. white
  11. magenta
  12. red
  13. #00ff00
  14. cyan
  15. yellow
  16. 242
  17. 3
  18. blue
  19. 62
  20. 94
  21. red
  22. #000000
  23. 190
  24. cyan
  25. blue
  26. bright green
  27. red
  28. 100
  29. 184
  30. 190
  31. #00ffff
  32. green
  33. blue
  34. 247
  35. #ff0000
  36. 50
  37. green
  38. #ffff00
  39. #ff00ff
  40. blue

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