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 #rrggbb, which colour do the first two digits give? (a) black (b) red (c) blue (d) green
- 2.🌈 In #00a700 the green part is the hex number a7. What is it as a normal number?
- 3.🌈 Which colour of light is strongest in rgb(25, 190, 47)? (a) green (b) blue (c) red
- 4.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) red (c) yellow (d) magenta
- 5.🌈 Which colour of light is strongest in rgb(27, 176, 13)? (a) green (b) blue (c) red
- 6.🌈 Which colour of light is strongest in rgb(253, 134, 74)? (a) green (b) red (c) blue
- 7.🌈 Which colour of light is strongest in rgb(64, 71, 204)? (a) blue (b) green (c) red
- 8.🌈 Which colour is #0000ff? (a) red (b) blue (c) black (d) white
- 9.🌈 Which colour of light is strongest in rgb(244, 45, 41)? (a) green (b) blue (c) red
- 10.🌈 In #1d0000 the red part is the hex number 1d. What is it as a normal number?
- 11.🌈 Which hex code is yellow? (a) #00ff00 (b) #ffff00 (c) #ff0000 (d) #ffffff
- 12.🌈 Which hex code is cyan? (a) #000000 (b) #00ffff (c) #ffff00 (d) #0000ff
- 13.🌈 In #d60000 the red part is the hex number d6. What is it as a normal number?
- 14.🌈 In #00fe00 the green part is the hex number fe. What is it as a normal number?
- 15.🌈 Which colour is #000000? (a) white (b) black (c) yellow (d) bright green
- 16.🌈 Which colour of light is strongest in rgb(117, 197, 43)? (a) red (b) blue (c) green
- 17.🌈 Which hex code is blue? (a) #ffff00 (b) #ffffff (c) #0000ff (d) #00ff00
- 18.🌈 Which colour of light is strongest in rgb(84, 251, 73)? (a) blue (b) green (c) red
- 19.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 2 (d) 4
- 20.🌈 Which colour is #ffffff? (a) bright green (b) red (c) white (d) magenta
- 21.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) Z (d) J
- 22.🌈 Which colour of light is strongest in rgb(224, 29, 138)? (a) blue (b) green (c) red
- 23.🌈 In #005500 the green part is the hex number 55. What is it as a normal number?
- 24.🌈 Which hex code is red? (a) #00ffff (b) #0000ff (c) #ff0000 (d) #ffffff
- 25.🌈 Which colour of light is strongest in rgb(241, 61, 86)? (a) blue (b) green (c) red
- 26.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) bright green (c) blue (d) yellow
- 27.🌈 Which colour is #ff00ff? (a) bright green (b) cyan (c) magenta (d) red
- 28.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) red (c) yellow (d) cyan
- 29.🌈 Which hex code is magenta? (a) #ffffff (b) #0000ff (c) #00ffff (d) #ff00ff
- 30.🌈 Which hex code is black? (a) #0000ff (b) #ff0000 (c) #000000 (d) #00ff00
- 31.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) red (d) green
- 32.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) bright green (c) blue (d) cyan
- 33.🌈 In #210000 the red part is the hex number 21. What is it as a normal number?
- 34.🌈 Which hex code is bright green? (a) #ffff00 (b) #ff00ff (c) #00ff00 (d) #000000
- 35.🌈 Which colour is #00ffff? (a) yellow (b) cyan (c) bright green (d) red
- 36.🌈 In #220000 the red part is the hex number 22. What is it as a normal number?
- 37.🌈 Which colour of light is strongest in rgb(53, 77, 150)? (a) red (b) green (c) blue
- 38.🌈 In #00f100 the green part is the hex number f1. What is it as a normal number?
- 39.🌈 Which colour is #ffff00? (a) red (b) blue (c) black (d) yellow
- 40.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 99 (c) 100 (d) 1000
Answer key
- red
- 167
- green
- white
- green
- red
- blue
- blue
- red
- 29
- #ffff00
- #00ffff
- 214
- 254
- black
- green
- #0000ff
- green
- 3
- white
- F
- red
- 85
- #ff0000
- red
- magenta
- magenta
- yellow
- #ff00ff
- #000000
- blue
- bright green
- 33
- #00ff00
- cyan
- 34
- blue
- 241
- yellow
- 255
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids