CSS Worksheet: Hex and RGB Colours
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.🌈 In #00009e the blue part is the hex number 9e. What is it as a normal number?
- 2.🌈 Which hex code is blue? (a) #0000ff (b) #00ff00 (c) #ffffff (d) #00ffff
- 3.🌈 Which hex code is white? (a) #00ff00 (b) #00ffff (c) #000000 (d) #ffffff
- 4.🌈 Which colour is #ff00ff? (a) bright green (b) black (c) blue (d) magenta
- 5.🌈 Which colour of light is strongest in rgb(96, 156, 102)? (a) red (b) green (c) blue
- 6.🌈 Which colour of light is strongest in rgb(80, 118, 222)? (a) blue (b) green (c) red
- 7.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) black (c) red (d) bright green
- 8.🌈 In #000008 the blue part is the hex number 08. What is it as a normal number?
- 9.🌈 Which hex code is red? (a) #00ffff (b) #000000 (c) #ff0000 (d) #0000ff
- 10.🌈 In #620000 the red part is the hex number 62. What is it as a normal number?
- 11.🌈 Which colour is #00ff00? (a) red (b) yellow (c) bright green (d) blue
- 12.🌈 Which hex code is magenta? (a) #000000 (b) #ffffff (c) #ff00ff (d) #ff0000
- 13.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) red (c) bright green (d) magenta
- 14.🌈 In #080000 the red part is the hex number 08. What is it as a normal number?
- 15.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 99 (d) 255
- 16.🌈 Which colour of light is strongest in rgb(97, 43, 233)? (a) red (b) green (c) blue
- 17.🌈 Which hex code is black? (a) #0000ff (b) #00ff00 (c) #00ffff (d) #000000
- 18.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) magenta (c) yellow (d) black
- 19.🌈 In #000067 the blue part is the hex number 67. What is it as a normal number?
- 20.🌈 Which colour is #0000ff? (a) red (b) cyan (c) bright green (d) blue
- 21.🌈 In #000019 the blue part is the hex number 19. What is it as a normal number?
- 22.🌈 Which colour is #ffff00? (a) cyan (b) bright green (c) white (d) yellow
- 23.🌈 Which colour of light is strongest in rgb(169, 27, 19)? (a) green (b) red (c) blue
- 24.🌈 Which colour is #ff0000? (a) black (b) cyan (c) magenta (d) red
- 25.🌈 Which colour of light is strongest in rgb(119, 249, 61)? (a) blue (b) red (c) green
- 26.🌈 Which colour is #00ffff? (a) bright green (b) cyan (c) red (d) blue
- 27.🌈 Which colour of light is strongest in rgb(246, 136, 108)? (a) green (b) red (c) blue
- 28.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) red (d) blue
- 29.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) red (d) black
- 30.🌈 Which colour of light is strongest in rgb(75, 167, 0)? (a) green (b) blue (c) red
- 31.🌈 Which colour of light is strongest in rgb(85, 102, 214)? (a) blue (b) red (c) green
- 32.🌈 Which colour of light is strongest in rgb(247, 4, 121)? (a) green (b) red (c) blue
- 33.🌈 In #0000c0 the blue part is the hex number c0. What is it as a normal number?
- 34.🌈 Which colour of light is strongest in rgb(167, 139, 96)? (a) blue (b) green (c) red
- 35.🌈 Which colour of light is strongest in rgb(160, 77, 50)? (a) red (b) green (c) blue
- 36.🌈 In #00eb00 the green part is the hex number eb. What is it as a normal number?
- 37.🌈 In #009000 the green part is the hex number 90. What is it as a normal number?
- 38.🌈 In #0000ea the blue part is the hex number ea. What is it as a normal number?
- 39.🌈 Which hex code is yellow? (a) #ffffff (b) #00ff00 (c) #00ffff (d) #ffff00
- 40.🌈 Which colour is rgb(0, 0, 0)? (a) blue (b) red (c) black (d) yellow
Answer key
- 158
- #0000ff
- #ffffff
- magenta
- green
- blue
- red
- 8
- #ff0000
- 98
- bright green
- #ff00ff
- magenta
- 8
- 255
- blue
- #000000
- yellow
- 103
- blue
- 25
- yellow
- red
- red
- green
- cyan
- red
- blue
- red
- green
- blue
- red
- 192
- red
- red
- 235
- 144
- 234
- #ffff00
- black
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids