← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 186 · 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 first two digits give? (a) red (b) green (c) blue (d) black
  2. 2.🌈 Which colour is #ffffff? (a) cyan (b) bright green (c) magenta (d) white
  3. 3.🌈 Which colour of light is strongest in rgb(220, 42, 26)? (a) green (b) red (c) blue
  4. 4.🌈 Which hex code is blue? (a) #ff0000 (b) #00ffff (c) #0000ff (d) #ff00ff
  5. 5.🌈 In #004400 the green part is the hex number 44. What is it as a normal number?
  6. 6.🌈 Which colour is #ff00ff? (a) white (b) red (c) cyan (d) magenta
  7. 7.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) F (c) J (d) Z
  8. 8.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) white (c) blue (d) black
  9. 9.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 2 (c) 4 (d) 3
  10. 10.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 1000 (c) 100 (d) 99
  11. 11.🌈 Which colour of light is strongest in rgb(137, 81, 160)? (a) red (b) blue (c) green
  12. 12.🌈 In #0a0000 the red part is the hex number 0a. What is it as a normal number?
  13. 13.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) yellow (c) cyan (d) white
  14. 14.🌈 Which colour is #00ffff? (a) red (b) black (c) yellow (d) cyan
  15. 15.🌈 Which colour of light is strongest in rgb(132, 205, 28)? (a) green (b) red (c) blue
  16. 16.🌈 Which colour of light is strongest in rgb(191, 126, 50)? (a) blue (b) red (c) green
  17. 17.🌈 Which hex code is red? (a) #000000 (b) #ffff00 (c) #ff0000 (d) #0000ff
  18. 18.🌈 Which colour is #000000? (a) white (b) black (c) magenta (d) yellow
  19. 19.🌈 Which colour is rgb(255, 0, 255)? (a) blue (b) red (c) black (d) magenta
  20. 20.🌈 Which colour is #ffff00? (a) bright green (b) yellow (c) red (d) blue
  21. 21.🌈 Which colour of light is strongest in rgb(47, 243, 14)? (a) red (b) green (c) blue
  22. 22.🌈 In #000096 the blue part is the hex number 96. What is it as a normal number?
  23. 23.🌈 Which colour of light is strongest in rgb(129, 205, 3)? (a) green (b) red (c) blue
  24. 24.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) white (c) blue (d) green
  25. 25.🌈 In #be0000 the red part is the hex number be. What is it as a normal number?
  26. 26.🌈 Which colour of light is strongest in rgb(27, 245, 125)? (a) green (b) red (c) blue
  27. 27.🌈 Which colour of light is strongest in rgb(195, 81, 52)? (a) red (b) green (c) blue
  28. 28.🌈 Which hex code is yellow? (a) #0000ff (b) #00ffff (c) #ffff00 (d) #ff0000
  29. 29.🌈 Which colour is #00ff00? (a) cyan (b) red (c) yellow (d) bright green
  30. 30.🌈 Which colour of light is strongest in rgb(89, 250, 128)? (a) blue (b) red (c) green
  31. 31.🌈 Which hex code is magenta? (a) #ff00ff (b) #ff0000 (c) #0000ff (d) #00ff00
  32. 32.🌈 Which colour of light is strongest in rgb(237, 29, 83)? (a) green (b) blue (c) red
  33. 33.🌈 Which colour of light is strongest in rgb(88, 51, 178)? (a) blue (b) green (c) red
  34. 34.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) red (c) magenta (d) blue
  35. 35.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) bright green (c) cyan (d) yellow
  36. 36.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) white (c) yellow (d) blue
  37. 37.🌈 Which colour of light is strongest in rgb(28, 163, 76)? (a) red (b) green (c) blue
  38. 38.🌈 In #0000a2 the blue part is the hex number a2. What is it as a normal number?
  39. 39.🌈 In #001000 the green part is the hex number 10. What is it as a normal number?
  40. 40.🌈 In #00b300 the green part is the hex number b3. What is it as a normal number?

Answer key

  1. red
  2. white
  3. red
  4. #0000ff
  5. 68
  6. magenta
  7. F
  8. blue
  9. 3
  10. 255
  11. blue
  12. 10
  13. white
  14. cyan
  15. green
  16. red
  17. #ff0000
  18. black
  19. magenta
  20. yellow
  21. green
  22. 150
  23. green
  24. blue
  25. 190
  26. green
  27. red
  28. #ffff00
  29. bright green
  30. green
  31. #ff00ff
  32. red
  33. blue
  34. cyan
  35. red
  36. yellow
  37. green
  38. 162
  39. 16
  40. 179

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