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) green (b) red (c) blue (d) black
- 2.🌈 Which colour of light is strongest in rgb(150, 131, 108)? (a) blue (b) red (c) green
- 3.🌈 Which colour is #ff00ff? (a) cyan (b) red (c) yellow (d) magenta
- 4.🌈 Which colour of light is strongest in rgb(32, 176, 0)? (a) blue (b) red (c) green
- 5.🌈 Which hex code is magenta? (a) #00ff00 (b) #000000 (c) #ff0000 (d) #ff00ff
- 6.🌈 Which colour is #ffff00? (a) yellow (b) black (c) blue (d) red
- 7.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 2 (d) 3
- 8.🌈 Which hex code is white? (a) #000000 (b) #00ff00 (c) #ff0000 (d) #ffffff
- 9.🌈 Which hex code is blue? (a) #00ff00 (b) #00ffff (c) #ffffff (d) #0000ff
- 10.🌈 Which hex code is bright green? (a) #000000 (b) #00ffff (c) #00ff00 (d) #ffffff
- 11.🌈 In #6d0000 the red part is the hex number 6d. What is it as a normal number?
- 12.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) green (c) white (d) red
- 13.🌈 Which colour is #ff0000? (a) cyan (b) yellow (c) red (d) white
- 14.🌈 Which hex code is yellow? (a) #000000 (b) #ffffff (c) #0000ff (d) #ffff00
- 15.🌈 In #200000 the red part is the hex number 20. What is it as a normal number?
- 16.🌈 Which colour of light is strongest in rgb(233, 123, 139)? (a) blue (b) red (c) green
- 17.🌈 Which colour is #0000ff? (a) yellow (b) blue (c) bright green (d) black
- 18.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) red (c) black (d) bright green
- 19.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) red (c) blue (d) black
- 20.🌈 Which colour of light is strongest in rgb(233, 130, 38)? (a) red (b) green (c) blue
- 21.🌈 Which colour is #00ff00? (a) red (b) cyan (c) white (d) bright green
- 22.🌈 In #470000 the red part is the hex number 47. What is it as a normal number?
- 23.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 255 (c) 99 (d) 100
- 24.🌈 In #007800 the green part is the hex number 78. What is it as a normal number?
- 25.🌈 Which hex code is cyan? (a) #00ff00 (b) #00ffff (c) #ff0000 (d) #ffffff
- 26.🌈 In #0c0000 the red part is the hex number 0c. What is it as a normal number?
- 27.🌈 Which colour of light is strongest in rgb(152, 47, 129)? (a) blue (b) green (c) red
- 28.🌈 In #180000 the red part is the hex number 18. What is it as a normal number?
- 29.🌈 In #00006f the blue part is the hex number 6f. What is it as a normal number?
- 30.🌈 Which hex code is red? (a) #ff00ff (b) #00ffff (c) #0000ff (d) #ff0000
- 31.🌈 Which colour of light is strongest in rgb(38, 235, 83)? (a) green (b) red (c) blue
- 32.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) Z (d) G
- 33.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) black (c) bright green (d) red
- 34.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) cyan (c) yellow (d) bright green
- 35.🌈 In #940000 the red part is the hex number 94. What is it as a normal number?
- 36.🌈 In #000013 the blue part is the hex number 13. What is it as a normal number?
- 37.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) magenta (c) black (d) yellow
- 38.🌈 In #160000 the red part is the hex number 16. What is it as a normal number?
- 39.🌈 Which colour of light is strongest in rgb(166, 79, 17)? (a) blue (b) green (c) red
- 40.🌈 In #a10000 the red part is the hex number a1. What is it as a normal number?
Answer key
- red
- red
- magenta
- green
- #ff00ff
- yellow
- 3
- #ffffff
- #0000ff
- #00ff00
- 109
- blue
- red
- #ffff00
- 32
- red
- blue
- bright green
- white
- red
- bright green
- 71
- 255
- 120
- #00ffff
- 12
- red
- 24
- 111
- #ff0000
- green
- F
- blue
- red
- 148
- 19
- black
- 22
- red
- 161
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids