← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 136 · 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, 255)? (a) cyan (b) blue (c) white (d) yellow
  2. 2.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) J (d) F
  3. 3.🌈 Which hex code is cyan? (a) #00ff00 (b) #00ffff (c) #000000 (d) #ffff00
  4. 4.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 4 (d) 6
  5. 5.🌈 Which colour is #ffffff? (a) red (b) cyan (c) blue (d) white
  6. 6.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) magenta (c) black (d) bright green
  7. 7.🌈 In #180000 the red part is the hex number 18. What is it as a normal number?
  8. 8.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) blue (d) green
  9. 9.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 255 (c) 99 (d) 100
  10. 10.🌈 Which colour is #00ff00? (a) red (b) magenta (c) white (d) bright green
  11. 11.🌈 Which colour of light is strongest in rgb(216, 30, 119)? (a) red (b) blue (c) green
  12. 12.🌈 Which hex code is red? (a) #000000 (b) #ff0000 (c) #00ff00 (d) #0000ff
  13. 13.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
  14. 14.🌈 Which colour is #0000ff? (a) blue (b) white (c) black (d) bright green
  15. 15.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) yellow (c) cyan (d) black
  16. 16.🌈 In #000700 the green part is the hex number 07. What is it as a normal number?
  17. 17.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) red (c) bright green (d) white
  18. 18.🌈 In #390000 the red part is the hex number 39. What is it as a normal number?
  19. 19.🌈 Which colour of light is strongest in rgb(61, 62, 152)? (a) green (b) blue (c) red
  20. 20.🌈 Which colour of light is strongest in rgb(6, 158, 37)? (a) blue (b) red (c) green
  21. 21.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) red (c) cyan (d) magenta
  22. 22.🌈 Which colour is rgb(0, 255, 0)? (a) cyan (b) bright green (c) blue (d) yellow
  23. 23.🌈 Which hex code is blue? (a) #0000ff (b) #000000 (c) #00ff00 (d) #ffff00
  24. 24.🌈 Which colour is #ff0000? (a) yellow (b) red (c) black (d) magenta
  25. 25.🌈 Which colour is #ff00ff? (a) magenta (b) cyan (c) white (d) yellow
  26. 26.🌈 In #003b00 the green part is the hex number 3b. What is it as a normal number?
  27. 27.🌈 Which hex code is white? (a) #000000 (b) #ff00ff (c) #00ffff (d) #ffffff
  28. 28.🌈 In #0d0000 the red part is the hex number 0d. What is it as a normal number?
  29. 29.🌈 In #000046 the blue part is the hex number 46. What is it as a normal number?
  30. 30.🌈 Which hex code is yellow? (a) #00ffff (b) #ff00ff (c) #00ff00 (d) #ffff00
  31. 31.🌈 Which hex code is bright green? (a) #00ffff (b) #00ff00 (c) #ffff00 (d) #0000ff
  32. 32.🌈 Which colour is #ffff00? (a) red (b) magenta (c) yellow (d) cyan
  33. 33.🌈 Which colour of light is strongest in rgb(8, 224, 51)? (a) blue (b) green (c) red
  34. 34.🌈 Which colour is #00ffff? (a) white (b) red (c) blue (d) cyan
  35. 35.🌈 In #ec0000 the red part is the hex number ec. What is it as a normal number?
  36. 36.🌈 Which colour is #000000? (a) cyan (b) white (c) black (d) blue
  37. 37.🌈 In #0000d8 the blue part is the hex number d8. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(76, 72, 236)? (a) green (b) red (c) blue
  39. 39.🌈 Which hex code is magenta? (a) #ffffff (b) #ffff00 (c) #00ffff (d) #ff00ff
  40. 40.🌈 Which colour of light is strongest in rgb(7, 181, 12)? (a) red (b) blue (c) green

Answer key

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

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