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 of light is strongest in rgb(53, 9, 192)? (a) green (b) blue (c) red
- 3.🌈 Which colour of light is strongest in rgb(154, 47, 55)? (a) red (b) blue (c) green
- 4.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) magenta (c) yellow (d) black
- 5.🌈 Which colour of light is strongest in rgb(35, 219, 105)? (a) red (b) green (c) blue
- 6.🌈 Which colour is #ff00ff? (a) bright green (b) blue (c) red (d) magenta
- 7.🌈 Which hex code is bright green? (a) #ffffff (b) #0000ff (c) #ffff00 (d) #00ff00
- 8.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) black (c) yellow (d) white
- 9.🌈 In #6a0000 the red part is the hex number 6a. What is it as a normal number?
- 10.🌈 Which colour is rgb(255, 255, 255)? (a) red (b) white (c) yellow (d) blue
- 11.🌈 Which colour of light is strongest in rgb(27, 58, 185)? (a) green (b) blue (c) red
- 12.🌈 Which colour is #000000? (a) black (b) white (c) magenta (d) red
- 13.🌈 In #00e500 the green part is the hex number e5. What is it as a normal number?
- 14.🌈 Which colour is #ffff00? (a) bright green (b) cyan (c) red (d) yellow
- 15.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) magenta (c) cyan (d) yellow
- 16.🌈 In #a10000 the red part is the hex number a1. What is it as a normal number?
- 17.🌈 In #0000ba the blue part is the hex number ba. What is it as a normal number?
- 18.🌈 Which colour of light is strongest in rgb(150, 133, 124)? (a) blue (b) red (c) green
- 19.🌈 Which hex code is blue? (a) #000000 (b) #0000ff (c) #ff00ff (d) #ffff00
- 20.🌈 Which colour is #ffffff? (a) white (b) black (c) blue (d) cyan
- 21.🌈 Which hex code is red? (a) #00ffff (b) #ff0000 (c) #ffff00 (d) #ffffff
- 22.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) bright green (c) yellow (d) blue
- 23.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 255 (d) 1000
- 24.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) blue (d) black
- 25.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) white (c) red (d) green
- 26.🌈 Which colour is #ff0000? (a) blue (b) white (c) red (d) magenta
- 27.🌈 In #fa0000 the red part is the hex number fa. What is it as a normal number?
- 28.🌈 In #000066 the blue part is the hex number 66. What is it as a normal number?
- 29.🌈 Which colour is #00ff00? (a) bright green (b) yellow (c) cyan (d) blue
- 30.🌈 Which hex code is black? (a) #000000 (b) #00ffff (c) #ffffff (d) #00ff00
- 31.🌈 Which colour of light is strongest in rgb(113, 19, 170)? (a) green (b) red (c) blue
- 32.🌈 Which hex code is yellow? (a) #00ff00 (b) #00ffff (c) #ffffff (d) #ffff00
- 33.🌈 Which colour of light is strongest in rgb(96, 28, 223)? (a) green (b) blue (c) red
- 34.🌈 Which colour of light is strongest in rgb(93, 166, 37)? (a) blue (b) red (c) green
- 35.🌈 In #ee0000 the red part is the hex number ee. What is it as a normal number?
- 36.🌈 Which colour of light is strongest in rgb(163, 28, 21)? (a) green (b) red (c) blue
- 37.🌈 Which colour of light is strongest in rgb(169, 91, 38)? (a) blue (b) red (c) green
- 38.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) F (d) J
- 39.🌈 In #820000 the red part is the hex number 82. What is it as a normal number?
- 40.🌈 In #7e0000 the red part is the hex number 7e. What is it as a normal number?
Answer key
- 3
- blue
- red
- blue
- green
- magenta
- #00ff00
- yellow
- 106
- white
- blue
- black
- 229
- yellow
- cyan
- 161
- 186
- red
- #0000ff
- white
- #ff0000
- bright green
- 255
- red
- blue
- red
- 250
- 102
- bright green
- #000000
- blue
- #ffff00
- blue
- green
- 238
- red
- red
- F
- 130
- 126
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids