← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 144 · 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 hex code is cyan? (a) #00ffff (b) #ff00ff (c) #ffffff (d) #0000ff
  2. 2.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) blue (c) bright green (d) cyan
  3. 3.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) blue (c) white (d) yellow
  4. 4.🌈 Which hex code is yellow? (a) #ffffff (b) #00ffff (c) #ffff00 (d) #00ff00
  5. 5.🌈 Which colour is #0000ff? (a) cyan (b) yellow (c) black (d) blue
  6. 6.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 255 (d) 99
  7. 7.🌈 Which colour is #ffffff? (a) blue (b) bright green (c) cyan (d) white
  8. 8.🌈 Which colour is #00ff00? (a) cyan (b) bright green (c) yellow (d) black
  9. 9.🌈 In #f80000 the red part is the hex number f8. What is it as a normal number?
  10. 10.🌈 Which colour of light is strongest in rgb(112, 249, 21)? (a) green (b) blue (c) red
  11. 11.🌈 Which colour of light is strongest in rgb(174, 117, 75)? (a) green (b) blue (c) red
  12. 12.🌈 Which colour of light is strongest in rgb(82, 158, 88)? (a) blue (b) red (c) green
  13. 13.🌈 Which colour of light is strongest in rgb(203, 115, 133)? (a) red (b) green (c) blue
  14. 14.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) Z (d) G
  15. 15.🌈 Which colour is #ffff00? (a) cyan (b) black (c) bright green (d) yellow
  16. 16.🌈 Which colour of light is strongest in rgb(6, 227, 121)? (a) blue (b) red (c) green
  17. 17.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) green (d) black
  18. 18.🌈 In #cf0000 the red part is the hex number cf. What is it as a normal number?
  19. 19.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) red (c) bright green (d) magenta
  20. 20.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 3 (d) 2
  21. 21.🌈 Which colour is #ff0000? (a) black (b) magenta (c) bright green (d) red
  22. 22.🌈 Which colour is #000000? (a) bright green (b) black (c) cyan (d) white
  23. 23.🌈 In #b00000 the red part is the hex number b0. What is it as a normal number?
  24. 24.🌈 In #003000 the green part is the hex number 30. What is it as a normal number?
  25. 25.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) yellow (c) magenta (d) bright green
  26. 26.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) green (d) red
  27. 27.🌈 Which colour of light is strongest in rgb(206, 140, 19)? (a) green (b) blue (c) red
  28. 28.🌈 In #240000 the red part is the hex number 24. What is it as a normal number?
  29. 29.🌈 Which hex code is black? (a) #000000 (b) #ffff00 (c) #ff00ff (d) #ffffff
  30. 30.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) black (c) bright green (d) blue
  31. 31.🌈 Which colour of light is strongest in rgb(10, 98, 247)? (a) blue (b) red (c) green
  32. 32.🌈 In #050000 the red part is the hex number 05. What is it as a normal number?
  33. 33.🌈 Which colour of light is strongest in rgb(77, 16, 169)? (a) blue (b) red (c) green
  34. 34.🌈 In #00fc00 the green part is the hex number fc. What is it as a normal number?
  35. 35.🌈 In #008800 the green part is the hex number 88. What is it as a normal number?
  36. 36.🌈 Which hex code is bright green? (a) #00ffff (b) #000000 (c) #ff0000 (d) #00ff00
  37. 37.🌈 Which colour of light is strongest in rgb(63, 244, 89)? (a) red (b) blue (c) green
  38. 38.🌈 Which hex code is red? (a) #000000 (b) #0000ff (c) #ffffff (d) #ff0000
  39. 39.🌈 Which colour of light is strongest in rgb(8, 57, 227)? (a) red (b) blue (c) green
  40. 40.🌈 Which hex code is white? (a) #ffff00 (b) #ffffff (c) #00ffff (d) #00ff00

Answer key

  1. #00ffff
  2. bright green
  3. cyan
  4. #ffff00
  5. blue
  6. 255
  7. white
  8. bright green
  9. 248
  10. green
  11. red
  12. green
  13. red
  14. F
  15. yellow
  16. green
  17. red
  18. 207
  19. magenta
  20. 3
  21. red
  22. black
  23. 176
  24. 48
  25. yellow
  26. blue
  27. red
  28. 36
  29. #000000
  30. black
  31. blue
  32. 5
  33. blue
  34. 252
  35. 136
  36. #00ff00
  37. green
  38. #ff0000
  39. blue
  40. #ffffff

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