← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 83 · 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(204, 57, 22)? (a) green (b) blue (c) red
  2. 2.🌈 Which colour is #ff0000? (a) magenta (b) yellow (c) red (d) cyan
  3. 3.🌈 In #ce0000 the red part is the hex number ce. What is it as a normal number?
  4. 4.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) black (d) green
  5. 5.🌈 Which colour of light is strongest in rgb(29, 47, 183)? (a) red (b) green (c) blue
  6. 6.🌈 Which hex code is magenta? (a) #ff0000 (b) #00ffff (c) #0000ff (d) #ff00ff
  7. 7.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) white (c) blue (d) green
  8. 8.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) white (c) black (d) bright green
  9. 9.🌈 Which hex code is cyan? (a) #000000 (b) #ffffff (c) #00ffff (d) #ffff00
  10. 10.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 1000 (d) 255
  11. 11.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) bright green (c) white (d) red
  12. 12.🌈 In #560000 the red part is the hex number 56. What is it as a normal number?
  13. 13.🌈 In #004400 the green part is the hex number 44. What is it as a normal number?
  14. 14.🌈 Which colour is #ff00ff? (a) red (b) bright green (c) magenta (d) blue
  15. 15.🌈 In #00005c the blue part is the hex number 5c. What is it as a normal number?
  16. 16.🌈 Which hex code is blue? (a) #0000ff (b) #ffff00 (c) #ff00ff (d) #ff0000
  17. 17.🌈 Which colour is #00ffff? (a) cyan (b) yellow (c) red (d) blue
  18. 18.🌈 Which colour is rgb(0, 255, 255)? (a) magenta (b) red (c) cyan (d) yellow
  19. 19.🌈 Which colour of light is strongest in rgb(21, 45, 233)? (a) green (b) red (c) blue
  20. 20.🌈 Which colour of light is strongest in rgb(106, 181, 105)? (a) blue (b) red (c) green
  21. 21.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) cyan (c) red (d) white
  22. 22.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) J (d) F
  23. 23.🌈 Which colour of light is strongest in rgb(160, 93, 92)? (a) red (b) blue (c) green
  24. 24.🌈 Which colour of light is strongest in rgb(13, 236, 134)? (a) red (b) blue (c) green
  25. 25.🌈 In #00ab00 the green part is the hex number ab. What is it as a normal number?
  26. 26.🌈 Which colour is #0000ff? (a) black (b) bright green (c) magenta (d) blue
  27. 27.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) bright green (c) cyan (d) magenta
  28. 28.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 6 (d) 3
  29. 29.🌈 In #fa0000 the red part is the hex number fa. What is it as a normal number?
  30. 30.🌈 Which hex code is yellow? (a) #ff0000 (b) #ffff00 (c) #00ff00 (d) #00ffff
  31. 31.🌈 In #00009e the blue part is the hex number 9e. What is it as a normal number?
  32. 32.🌈 Which hex code is bright green? (a) #00ffff (b) #ffff00 (c) #ff0000 (d) #00ff00
  33. 33.🌈 In #b00000 the red part is the hex number b0. What is it as a normal number?
  34. 34.🌈 In #000035 the blue part is the hex number 35. What is it as a normal number?
  35. 35.🌈 In #000019 the blue part is the hex number 19. What is it as a normal number?
  36. 36.🌈 Which hex code is white? (a) #ff0000 (b) #ffff00 (c) #ffffff (d) #00ffff
  37. 37.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) red (c) blue (d) bright green
  38. 38.🌈 Which colour of light is strongest in rgb(58, 229, 51)? (a) green (b) red (c) blue
  39. 39.🌈 In #000d00 the green part is the hex number 0d. What is it as a normal number?
  40. 40.🌈 In #008300 the green part is the hex number 83. What is it as a normal number?

Answer key

  1. red
  2. red
  3. 206
  4. red
  5. blue
  6. #ff00ff
  7. blue
  8. blue
  9. #00ffff
  10. 255
  11. red
  12. 86
  13. 68
  14. magenta
  15. 92
  16. #0000ff
  17. cyan
  18. cyan
  19. blue
  20. green
  21. white
  22. F
  23. red
  24. green
  25. 171
  26. blue
  27. black
  28. 3
  29. 250
  30. #ffff00
  31. 158
  32. #00ff00
  33. 176
  34. 53
  35. 25
  36. #ffffff
  37. bright green
  38. green
  39. 13
  40. 131

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