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.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 6 (d) 3
- 2.🌈 Which colour is #ffffff? (a) black (b) white (c) bright green (d) red
- 3.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) magenta (c) white (d) red
- 4.🌈 In #00f500 the green part is the hex number f5. What is it as a normal number?
- 5.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) yellow (c) white (d) red
- 6.🌈 In #00d700 the green part is the hex number d7. What is it as a normal number?
- 7.🌈 Which colour of light is strongest in rgb(163, 18, 62)? (a) green (b) blue (c) red
- 8.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 99 (d) 1000
- 9.🌈 Which colour is #00ff00? (a) black (b) cyan (c) yellow (d) bright green
- 10.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) red (c) cyan (d) yellow
- 11.🌈 Which colour of light is strongest in rgb(123, 116, 171)? (a) green (b) blue (c) red
- 12.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) red (d) white
- 13.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) blue (c) red (d) cyan
- 14.🌈 In #00008e the blue part is the hex number 8e. What is it as a normal number?
- 15.🌈 Which colour is rgb(0, 0, 0)? (a) blue (b) magenta (c) black (d) bright green
- 16.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) yellow (c) bright green (d) magenta
- 17.🌈 Which colour of light is strongest in rgb(116, 250, 74)? (a) blue (b) red (c) green
- 18.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) red (d) black
- 19.🌈 Which colour of light is strongest in rgb(231, 82, 54)? (a) blue (b) red (c) green
- 20.🌈 In #000e00 the green part is the hex number 0e. What is it as a normal number?
- 21.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) blue (c) red (d) magenta
- 22.🌈 In #9d0000 the red part is the hex number 9d. What is it as a normal number?
- 23.🌈 Which colour is #00ffff? (a) black (b) bright green (c) white (d) cyan
- 24.🌈 Which hex code is bright green? (a) #0000ff (b) #ffff00 (c) #ff0000 (d) #00ff00
- 25.🌈 Which colour of light is strongest in rgb(71, 0, 247)? (a) green (b) blue (c) red
- 26.🌈 In #00c900 the green part is the hex number c9. What is it as a normal number?
- 27.🌈 Which hex code is cyan? (a) #ff0000 (b) #ff00ff (c) #0000ff (d) #00ffff
- 28.🌈 Which hex code is yellow? (a) #00ffff (b) #ffff00 (c) #ffffff (d) #ff00ff
- 29.🌈 Which colour is #ffff00? (a) yellow (b) cyan (c) blue (d) bright green
- 30.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) J (d) F
- 31.🌈 In #7b0000 the red part is the hex number 7b. What is it as a normal number?
- 32.🌈 Which hex code is red? (a) #ff00ff (b) #000000 (c) #ff0000 (d) #ffff00
- 33.🌈 Which colour of light is strongest in rgb(71, 55, 184)? (a) red (b) green (c) blue
- 34.🌈 Which colour of light is strongest in rgb(176, 61, 18)? (a) blue (b) green (c) red
- 35.🌈 In #00c200 the green part is the hex number c2. What is it as a normal number?
- 36.🌈 Which colour of light is strongest in rgb(47, 213, 35)? (a) green (b) red (c) blue
- 37.🌈 Which colour of light is strongest in rgb(46, 113, 158)? (a) blue (b) green (c) red
- 38.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) black (c) bright green (d) blue
- 39.🌈 Which hex code is white? (a) #0000ff (b) #ffffff (c) #00ff00 (d) #ff00ff
- 40.🌈 Which colour is #ff0000? (a) black (b) blue (c) red (d) bright green
Answer key
- 3
- white
- cyan
- 245
- yellow
- 215
- red
- 255
- bright green
- red
- blue
- blue
- white
- 142
- black
- bright green
- green
- red
- red
- 14
- magenta
- 157
- cyan
- #00ff00
- blue
- 201
- #00ffff
- #ffff00
- yellow
- F
- 123
- #ff0000
- blue
- red
- 194
- green
- blue
- blue
- #ffffff
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids