← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 187 · 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.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 99 (c) 100 (d) 255
  2. 2.🌈 Which hex code is yellow? (a) #ffffff (b) #ffff00 (c) #0000ff (d) #ff0000
  3. 3.🌈 Which colour of light is strongest in rgb(106, 51, 199)? (a) red (b) green (c) blue
  4. 4.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) green (d) black
  5. 5.🌈 Which colour is #0000ff? (a) white (b) blue (c) bright green (d) magenta
  6. 6.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) blue (c) red (d) cyan
  7. 7.🌈 In #00f400 the green part is the hex number f4. What is it as a normal number?
  8. 8.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 6 (c) 4 (d) 2
  9. 9.🌈 Which colour of light is strongest in rgb(152, 90, 60)? (a) red (b) green (c) blue
  10. 10.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) red (d) white
  11. 11.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) F (c) J (d) G
  12. 12.🌈 Which colour of light is strongest in rgb(44, 116, 211)? (a) green (b) red (c) blue
  13. 13.🌈 In #006f00 the green part is the hex number 6f. What is it as a normal number?
  14. 14.🌈 Which colour of light is strongest in rgb(178, 84, 11)? (a) green (b) blue (c) red
  15. 15.🌈 Which colour of light is strongest in rgb(7, 6, 191)? (a) red (b) green (c) blue
  16. 16.🌈 In #680000 the red part is the hex number 68. What is it as a normal number?
  17. 17.🌈 In #00f500 the green part is the hex number f5. What is it as a normal number?
  18. 18.🌈 Which colour of light is strongest in rgb(200, 62, 78)? (a) green (b) blue (c) red
  19. 19.🌈 Which colour of light is strongest in rgb(119, 167, 66)? (a) green (b) red (c) blue
  20. 20.🌈 In #770000 the red part is the hex number 77. What is it as a normal number?
  21. 21.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) yellow (c) bright green (d) magenta
  22. 22.🌈 Which colour is rgb(0, 0, 0)? (a) blue (b) bright green (c) cyan (d) black
  23. 23.🌈 Which colour is #00ff00? (a) white (b) cyan (c) magenta (d) bright green
  24. 24.🌈 Which hex code is blue? (a) #ffffff (b) #0000ff (c) #ff00ff (d) #00ff00
  25. 25.🌈 In #00006f the blue part is the hex number 6f. What is it as a normal number?
  26. 26.🌈 Which hex code is bright green? (a) #00ffff (b) #ffff00 (c) #00ff00 (d) #0000ff
  27. 27.🌈 Which hex code is magenta? (a) #00ff00 (b) #0000ff (c) #000000 (d) #ff00ff
  28. 28.🌈 In #00fe00 the green part is the hex number fe. What is it as a normal number?
  29. 29.🌈 Which colour of light is strongest in rgb(78, 237, 11)? (a) red (b) blue (c) green
  30. 30.🌈 In #7b0000 the red part is the hex number 7b. What is it as a normal number?
  31. 31.🌈 In #620000 the red part is the hex number 62. What is it as a normal number?
  32. 32.🌈 Which colour is #ff00ff? (a) white (b) magenta (c) bright green (d) black
  33. 33.🌈 Which colour is #ffff00? (a) magenta (b) white (c) yellow (d) red
  34. 34.🌈 Which colour of light is strongest in rgb(158, 42, 64)? (a) green (b) red (c) blue
  35. 35.🌈 Which colour of light is strongest in rgb(109, 65, 210)? (a) blue (b) green (c) red
  36. 36.🌈 Which colour of light is strongest in rgb(50, 224, 3)? (a) green (b) blue (c) red
  37. 37.🌈 Which colour is rgb(255, 0, 255)? (a) cyan (b) red (c) magenta (d) yellow
  38. 38.🌈 Which hex code is white? (a) #ff0000 (b) #00ff00 (c) #0000ff (d) #ffffff
  39. 39.🌈 In #00e400 the green part is the hex number e4. What is it as a normal number?
  40. 40.🌈 In #d70000 the red part is the hex number d7. What is it as a normal number?

Answer key

  1. 255
  2. #ffff00
  3. blue
  4. red
  5. blue
  6. blue
  7. 244
  8. 3
  9. red
  10. blue
  11. F
  12. blue
  13. 111
  14. red
  15. blue
  16. 104
  17. 245
  18. red
  19. green
  20. 119
  21. yellow
  22. black
  23. bright green
  24. #0000ff
  25. 111
  26. #00ff00
  27. #ff00ff
  28. 254
  29. green
  30. 123
  31. 98
  32. magenta
  33. yellow
  34. red
  35. blue
  36. green
  37. magenta
  38. #ffffff
  39. 228
  40. 215

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