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.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) F (d) G
- 2.🌈 Which hex code is red? (a) #00ff00 (b) #ff0000 (c) #000000 (d) #ffffff
- 3.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) green (d) red
- 4.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) blue (c) yellow (d) bright green
- 5.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 6 (c) 4 (d) 2
- 6.🌈 Which colour of light is strongest in rgb(216, 140, 107)? (a) red (b) blue (c) green
- 7.🌈 Which colour is #ff0000? (a) magenta (b) yellow (c) bright green (d) red
- 8.🌈 Which hex code is white? (a) #000000 (b) #ff0000 (c) #ffffff (d) #ffff00
- 9.🌈 Which colour is #ff00ff? (a) cyan (b) red (c) magenta (d) bright green
- 10.🌈 Which colour is rgb(255, 0, 255)? (a) red (b) magenta (c) blue (d) black
- 11.🌈 Which colour is #000000? (a) black (b) white (c) yellow (d) red
- 12.🌈 In #560000 the red part is the hex number 56. What is it as a normal number?
- 13.🌈 Which hex code is yellow? (a) #ffffff (b) #ff0000 (c) #000000 (d) #ffff00
- 14.🌈 Which colour is #ffff00? (a) blue (b) cyan (c) red (d) yellow
- 15.🌈 Which hex code is magenta? (a) #ff0000 (b) #0000ff (c) #ff00ff (d) #00ff00
- 16.🌈 Which colour is rgb(0, 255, 0)? (a) magenta (b) cyan (c) red (d) bright green
- 17.🌈 Which colour of light is strongest in rgb(184, 20, 12)? (a) green (b) red (c) blue
- 18.🌈 In #007300 the green part is the hex number 73. What is it as a normal number?
- 19.🌈 In #0000ec the blue part is the hex number ec. What is it as a normal number?
- 20.🌈 Which colour of light is strongest in rgb(56, 61, 217)? (a) green (b) red (c) blue
- 21.🌈 Which colour of light is strongest in rgb(117, 178, 32)? (a) red (b) blue (c) green
- 22.🌈 In #00f000 the green part is the hex number f0. What is it as a normal number?
- 23.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 1000 (c) 100 (d) 99
- 24.🌈 In #2a0000 the red part is the hex number 2a. What is it as a normal number?
- 25.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) black (d) green
- 26.🌈 Which colour is #00ff00? (a) white (b) cyan (c) black (d) bright green
- 27.🌈 Which colour is #0000ff? (a) black (b) blue (c) white (d) bright green
- 28.🌈 In #0000ef the blue part is the hex number ef. What is it as a normal number?
- 29.🌈 Which colour of light is strongest in rgb(80, 240, 32)? (a) green (b) blue (c) red
- 30.🌈 Which colour is #ffffff? (a) white (b) blue (c) magenta (d) cyan
- 31.🌈 Which colour of light is strongest in rgb(64, 158, 127)? (a) green (b) red (c) blue
- 32.🌈 In #c40000 the red part is the hex number c4. What is it as a normal number?
- 33.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) black (c) cyan (d) white
- 34.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) magenta (c) red (d) black
- 35.🌈 Which hex code is black? (a) #ff0000 (b) #000000 (c) #0000ff (d) #ff00ff
- 36.🌈 In #f80000 the red part is the hex number f8. What is it as a normal number?
- 37.🌈 Which colour is rgb(255, 255, 255)? (a) red (b) cyan (c) black (d) white
- 38.🌈 In #000014 the blue part is the hex number 14. What is it as a normal number?
- 39.🌈 Which colour of light is strongest in rgb(72, 72, 228)? (a) green (b) red (c) blue
- 40.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) blue (c) magenta (d) red
Answer key
- F
- #ff0000
- blue
- yellow
- 3
- red
- red
- #ffffff
- magenta
- magenta
- black
- 86
- #ffff00
- yellow
- #ff00ff
- bright green
- red
- 115
- 236
- blue
- green
- 240
- 255
- 42
- red
- bright green
- blue
- 239
- green
- white
- green
- 196
- cyan
- black
- #000000
- 248
- white
- 20
- blue
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids