← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 9 · 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 #00ffff? (a) cyan (b) white (c) magenta (d) blue
  2. 2.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) magenta (c) white (d) cyan
  3. 3.🌈 In #ac0000 the red part is the hex number ac. What is it as a normal number?
  4. 4.🌈 In #350000 the red part is the hex number 35. What is it as a normal number?
  5. 5.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) red (c) magenta (d) bright green
  6. 6.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) G (d) F
  7. 7.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 6 (c) 4 (d) 2
  8. 8.🌈 Which colour is #ff00ff? (a) bright green (b) black (c) white (d) magenta
  9. 9.🌈 Which hex code is blue? (a) #ff0000 (b) #ff00ff (c) #00ff00 (d) #0000ff
  10. 10.🌈 Which colour is rgb(0, 0, 255)? (a) cyan (b) black (c) yellow (d) blue
  11. 11.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) white (c) yellow (d) black
  12. 12.🌈 In #f80000 the red part is the hex number f8. What is it as a normal number?
  13. 13.🌈 Which colour is #ff0000? (a) red (b) yellow (c) blue (d) magenta
  14. 14.🌈 Which colour of light is strongest in rgb(93, 217, 83)? (a) red (b) blue (c) green
  15. 15.🌈 In #002400 the green part is the hex number 24. What is it as a normal number?
  16. 16.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) cyan (c) white (d) blue
  17. 17.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 255 (d) 99
  18. 18.🌈 Which colour of light is strongest in rgb(19, 129, 152)? (a) green (b) blue (c) red
  19. 19.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) black (c) blue (d) magenta
  20. 20.🌈 Which hex code is cyan? (a) #00ff00 (b) #ffffff (c) #00ffff (d) #ff00ff
  21. 21.🌈 Which hex code is magenta? (a) #ff00ff (b) #000000 (c) #0000ff (d) #00ff00
  22. 22.🌈 In #0000d9 the blue part is the hex number d9. What is it as a normal number?
  23. 23.🌈 Which colour of light is strongest in rgb(203, 11, 123)? (a) green (b) blue (c) red
  24. 24.🌈 In #840000 the red part is the hex number 84. What is it as a normal number?
  25. 25.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) red (d) green
  26. 26.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
  27. 27.🌈 In #db0000 the red part is the hex number db. What is it as a normal number?
  28. 28.🌈 In #b00000 the red part is the hex number b0. What is it as a normal number?
  29. 29.🌈 Which colour of light is strongest in rgb(167, 35, 136)? (a) green (b) blue (c) red
  30. 30.🌈 In #0c0000 the red part is the hex number 0c. What is it as a normal number?
  31. 31.🌈 In #00c400 the green part is the hex number c4. What is it as a normal number?
  32. 32.🌈 In #00006c the blue part is the hex number 6c. What is it as a normal number?
  33. 33.🌈 Which colour is #ffff00? (a) white (b) blue (c) cyan (d) yellow
  34. 34.🌈 Which colour of light is strongest in rgb(49, 238, 7)? (a) red (b) blue (c) green
  35. 35.🌈 Which colour is #0000ff? (a) red (b) white (c) blue (d) bright green
  36. 36.🌈 In #00e900 the green part is the hex number e9. What is it as a normal number?
  37. 37.🌈 Which hex code is yellow? (a) #ff0000 (b) #ffff00 (c) #00ffff (d) #000000
  38. 38.🌈 Which colour of light is strongest in rgb(55, 154, 89)? (a) blue (b) red (c) green
  39. 39.🌈 Which colour of light is strongest in rgb(164, 34, 89)? (a) blue (b) red (c) green
  40. 40.🌈 Which colour of light is strongest in rgb(111, 27, 225)? (a) blue (b) green (c) red

Answer key

  1. cyan
  2. red
  3. 172
  4. 53
  5. magenta
  6. F
  7. 3
  8. magenta
  9. #0000ff
  10. blue
  11. yellow
  12. 248
  13. red
  14. green
  15. 36
  16. bright green
  17. 255
  18. blue
  19. black
  20. #00ffff
  21. #ff00ff
  22. 217
  23. red
  24. 132
  25. blue
  26. red
  27. 219
  28. 176
  29. red
  30. 12
  31. 196
  32. 108
  33. yellow
  34. green
  35. blue
  36. 233
  37. #ffff00
  38. green
  39. red
  40. blue

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