← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 307 · 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 #ffffff? (a) yellow (b) cyan (c) white (d) black
  2. 2.🌈 In #390000 the red part is the hex number 39. What is it as a normal number?
  3. 3.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) red (c) green (d) white
  4. 4.🌈 Which colour is #0000ff? (a) black (b) magenta (c) blue (d) bright green
  5. 5.🌈 Which colour is #00ff00? (a) white (b) bright green (c) red (d) black
  6. 6.🌈 In #000058 the blue part is the hex number 58. What is it as a normal number?
  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 #ff0000? (a) red (b) cyan (c) yellow (d) bright green
  9. 9.🌈 Which hex code is blue? (a) #0000ff (b) #000000 (c) #ff0000 (d) #ffffff
  10. 10.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 2 (d) 3
  11. 11.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) red (d) black
  12. 12.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) magenta (c) bright green (d) black
  13. 13.🌈 Which colour of light is strongest in rgb(194, 113, 55)? (a) blue (b) red (c) green
  14. 14.🌈 Which hex code is black? (a) #00ff00 (b) #0000ff (c) #ffffff (d) #000000
  15. 15.🌈 In #3e0000 the red part is the hex number 3e. What is it as a normal number?
  16. 16.🌈 Which colour of light is strongest in rgb(132, 180, 73)? (a) red (b) green (c) blue
  17. 17.🌈 In #00c200 the green part is the hex number c2. What is it as a normal number?
  18. 18.🌈 In #d00000 the red part is the hex number d0. What is it as a normal number?
  19. 19.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 255 (d) 1000
  20. 20.🌈 Which hex code is bright green? (a) #ff00ff (b) #ffffff (c) #00ff00 (d) #000000
  21. 21.🌈 Which hex code is yellow? (a) #ff0000 (b) #ffff00 (c) #0000ff (d) #ff00ff
  22. 22.🌈 In #0000ac the blue part is the hex number ac. What is it as a normal number?
  23. 23.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) blue (c) red (d) magenta
  24. 24.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) cyan (c) red (d) magenta
  25. 25.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) red (c) bright green (d) blue
  26. 26.🌈 In #006400 the green part is the hex number 64. What is it as a normal number?
  27. 27.🌈 Which colour of light is strongest in rgb(87, 101, 211)? (a) red (b) green (c) blue
  28. 28.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) bright green (c) black (d) white
  29. 29.🌈 In #000041 the blue part is the hex number 41. What is it as a normal number?
  30. 30.🌈 In #001000 the green part is the hex number 10. What is it as a normal number?
  31. 31.🌈 Which colour of light is strongest in rgb(105, 246, 55)? (a) blue (b) green (c) red
  32. 32.🌈 Which colour of light is strongest in rgb(48, 233, 34)? (a) green (b) red (c) blue
  33. 33.🌈 Which colour of light is strongest in rgb(21, 161, 35)? (a) blue (b) red (c) green
  34. 34.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) bright green (c) blue (d) cyan
  35. 35.🌈 Which colour of light is strongest in rgb(139, 156, 135)? (a) blue (b) red (c) green
  36. 36.🌈 Which colour of light is strongest in rgb(212, 56, 80)? (a) green (b) blue (c) red
  37. 37.🌈 In #002800 the green part is the hex number 28. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(116, 231, 37)? (a) red (b) blue (c) green
  39. 39.🌈 Which hex code is white? (a) #ffffff (b) #00ffff (c) #00ff00 (d) #ff0000
  40. 40.🌈 Which colour of light is strongest in rgb(122, 56, 202)? (a) red (b) blue (c) green

Answer key

  1. white
  2. 57
  3. blue
  4. blue
  5. bright green
  6. 88
  7. F
  8. red
  9. #0000ff
  10. 3
  11. red
  12. bright green
  13. red
  14. #000000
  15. 62
  16. green
  17. 194
  18. 208
  19. 255
  20. #00ff00
  21. #ffff00
  22. 172
  23. red
  24. yellow
  25. blue
  26. 100
  27. blue
  28. black
  29. 65
  30. 16
  31. green
  32. green
  33. green
  34. cyan
  35. green
  36. red
  37. 40
  38. green
  39. #ffffff
  40. blue

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