← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 4 · 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 of light is strongest in rgb(10, 54, 223)? (a) blue (b) red (c) green
  2. 2.🌈 Which colour of light is strongest in rgb(77, 89, 187)? (a) red (b) blue (c) green
  3. 3.🌈 Which hex code is yellow? (a) #ffffff (b) #ffff00 (c) #ff0000 (d) #00ff00
  4. 4.🌈 Which colour is #ff0000? (a) yellow (b) red (c) white (d) magenta
  5. 5.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) black (d) green
  6. 6.🌈 Which colour is #00ffff? (a) magenta (b) bright green (c) cyan (d) yellow
  7. 7.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) red (c) black (d) cyan
  8. 8.🌈 Which colour is #ffffff? (a) yellow (b) black (c) blue (d) white
  9. 9.🌈 Which colour is #00ff00? (a) magenta (b) yellow (c) black (d) bright green
  10. 10.🌈 Which colour is rgb(0, 255, 255)? (a) red (b) cyan (c) yellow (d) blue
  11. 11.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 99 (c) 100 (d) 255
  12. 12.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) green (c) white (d) red
  13. 13.🌈 Which hex code is cyan? (a) #000000 (b) #0000ff (c) #00ff00 (d) #00ffff
  14. 14.🌈 In #004c00 the green part is the hex number 4c. What is it as a normal number?
  15. 15.🌈 In #003400 the green part is the hex number 34. What is it as a normal number?
  16. 16.🌈 Which colour of light is strongest in rgb(78, 39, 246)? (a) red (b) green (c) blue
  17. 17.🌈 Which hex code is red? (a) #ffffff (b) #ffff00 (c) #ff0000 (d) #000000
  18. 18.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) black (c) yellow (d) red
  19. 19.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 4 (d) 6
  20. 20.🌈 Which hex code is blue? (a) #00ff00 (b) #0000ff (c) #ff00ff (d) #000000
  21. 21.🌈 In #000037 the blue part is the hex number 37. What is it as a normal number?
  22. 22.🌈 Which colour of light is strongest in rgb(14, 55, 151)? (a) green (b) red (c) blue
  23. 23.🌈 In #720000 the red part is the hex number 72. What is it as a normal number?
  24. 24.🌈 In #006300 the green part is the hex number 63. What is it as a normal number?
  25. 25.🌈 In #00ce00 the green part is the hex number ce. What is it as a normal number?
  26. 26.🌈 Which colour is rgb(255, 0, 255)? (a) cyan (b) black (c) red (d) magenta
  27. 27.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) black (c) white (d) blue
  28. 28.🌈 In #0000f5 the blue part is the hex number f5. What is it as a normal number?
  29. 29.🌈 Which hex code is black? (a) #ff00ff (b) #000000 (c) #ffff00 (d) #ffffff
  30. 30.🌈 Which colour of light is strongest in rgb(199, 70, 58)? (a) blue (b) red (c) green
  31. 31.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) G (d) F
  32. 32.🌈 In #00008a the blue part is the hex number 8a. What is it as a normal number?
  33. 33.🌈 Which colour of light is strongest in rgb(63, 183, 22)? (a) red (b) blue (c) green
  34. 34.🌈 Which hex code is white? (a) #ffff00 (b) #ff0000 (c) #00ffff (d) #ffffff
  35. 35.🌈 In #140000 the red part is the hex number 14. What is it as a normal number?
  36. 36.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) red (c) magenta (d) yellow
  37. 37.🌈 In #00e300 the green part is the hex number e3. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(135, 87, 202)? (a) blue (b) red (c) green
  39. 39.🌈 In #860000 the red part is the hex number 86. What is it as a normal number?
  40. 40.🌈 Which colour of light is strongest in rgb(3, 48, 190)? (a) green (b) blue (c) red

Answer key

  1. blue
  2. blue
  3. #ffff00
  4. red
  5. red
  6. cyan
  7. black
  8. white
  9. bright green
  10. cyan
  11. 255
  12. blue
  13. #00ffff
  14. 76
  15. 52
  16. blue
  17. #ff0000
  18. bright green
  19. 3
  20. #0000ff
  21. 55
  22. blue
  23. 114
  24. 99
  25. 206
  26. magenta
  27. blue
  28. 245
  29. #000000
  30. red
  31. F
  32. 138
  33. green
  34. #ffffff
  35. 20
  36. yellow
  37. 227
  38. blue
  39. 134
  40. blue

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