← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 228 · 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) green (b) black (c) red (d) blue
  2. 2.🌈 Which colour of light is strongest in rgb(248, 20, 49)? (a) blue (b) red (c) green
  3. 3.🌈 Which colour is #ff0000? (a) white (b) red (c) blue (d) magenta
  4. 4.🌈 In #000072 the blue part is the hex number 72. What is it as a normal number?
  5. 5.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) Z (c) J (d) G
  6. 6.🌈 Which colour of light is strongest in rgb(25, 229, 136)? (a) red (b) blue (c) green
  7. 7.🌈 Which colour of light is strongest in rgb(113, 176, 32)? (a) red (b) blue (c) green
  8. 8.🌈 Which colour is #00ff00? (a) cyan (b) white (c) blue (d) bright green
  9. 9.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 255 (c) 100 (d) 99
  10. 10.🌈 In #000084 the blue part is the hex number 84. What is it as a normal number?
  11. 11.🌈 Which colour is rgb(255, 0, 255)? (a) red (b) magenta (c) cyan (d) bright green
  12. 12.🌈 Which hex code is bright green? (a) #ffffff (b) #ffff00 (c) #00ffff (d) #00ff00
  13. 13.🌈 Which colour of light is strongest in rgb(72, 185, 37)? (a) blue (b) red (c) green
  14. 14.🌈 In #000049 the blue part is the hex number 49. What is it as a normal number?
  15. 15.🌈 Which colour of light is strongest in rgb(166, 49, 20)? (a) blue (b) red (c) green
  16. 16.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 2 (c) 3 (d) 4
  17. 17.🌈 Which colour is #ff00ff? (a) white (b) black (c) red (d) magenta
  18. 18.🌈 Which colour of light is strongest in rgb(230, 16, 74)? (a) blue (b) red (c) green
  19. 19.🌈 Which hex code is black? (a) #000000 (b) #ffffff (c) #0000ff (d) #ff0000
  20. 20.🌈 In #004f00 the green part is the hex number 4f. What is it as a normal number?
  21. 21.🌈 In #210000 the red part is the hex number 21. What is it as a normal number?
  22. 22.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) white (c) magenta (d) bright green
  23. 23.🌈 Which colour of light is strongest in rgb(27, 203, 18)? (a) green (b) blue (c) red
  24. 24.🌈 Which hex code is cyan? (a) #ff00ff (b) #ffff00 (c) #ffffff (d) #00ffff
  25. 25.🌈 Which colour is #00ffff? (a) yellow (b) bright green (c) cyan (d) red
  26. 26.🌈 Which hex code is blue? (a) #0000ff (b) #ff0000 (c) #00ff00 (d) #000000
  27. 27.🌈 In #000068 the blue part is the hex number 68. What is it as a normal number?
  28. 28.🌈 In #120000 the red part is the hex number 12. What is it as a normal number?
  29. 29.🌈 In #750000 the red part is the hex number 75. What is it as a normal number?
  30. 30.🌈 Which colour is rgb(0, 255, 0)? (a) magenta (b) bright green (c) blue (d) cyan
  31. 31.🌈 In #00002c the blue part is the hex number 2c. What is it as a normal number?
  32. 32.🌈 Which colour of light is strongest in rgb(41, 165, 60)? (a) blue (b) green (c) red
  33. 33.🌈 Which colour of light is strongest in rgb(152, 10, 89)? (a) red (b) blue (c) green
  34. 34.🌈 Which colour of light is strongest in rgb(48, 207, 9)? (a) blue (b) green (c) red
  35. 35.🌈 In #00eb00 the green part is the hex number eb. What is it as a normal number?
  36. 36.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) blue (d) white
  37. 37.🌈 Which hex code is magenta? (a) #ffff00 (b) #ff0000 (c) #0000ff (d) #ff00ff
  38. 38.🌈 Which hex code is red? (a) #ffff00 (b) #ff0000 (c) #00ff00 (d) #ffffff
  39. 39.🌈 In #a20000 the red part is the hex number a2. What is it as a normal number?
  40. 40.🌈 In #b70000 the red part is the hex number b7. What is it as a normal number?

Answer key

  1. red
  2. red
  3. red
  4. 114
  5. F
  6. green
  7. green
  8. bright green
  9. 255
  10. 132
  11. magenta
  12. #00ff00
  13. green
  14. 73
  15. red
  16. 3
  17. magenta
  18. red
  19. #000000
  20. 79
  21. 33
  22. blue
  23. green
  24. #00ffff
  25. cyan
  26. #0000ff
  27. 104
  28. 18
  29. 117
  30. bright green
  31. 44
  32. green
  33. red
  34. green
  35. 235
  36. blue
  37. #ff00ff
  38. #ff0000
  39. 162
  40. 183

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