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) 4 (b) 2 (c) 3 (d) 6
- 2.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) Z (c) G (d) J
- 3.🌈 Which colour of light is strongest in rgb(112, 103, 228)? (a) red (b) green (c) blue
- 4.🌈 In #005c00 the green part is the hex number 5c. What is it as a normal number?
- 5.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) red (c) black (d) white
- 6.🌈 Which colour of light is strongest in rgb(79, 201, 77)? (a) green (b) red (c) blue
- 7.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 1000 (d) 255
- 8.🌈 Which colour of light is strongest in rgb(190, 9, 120)? (a) blue (b) red (c) green
- 9.🌈 Which colour is #00ff00? (a) white (b) bright green (c) black (d) magenta
- 10.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) blue (c) white (d) yellow
- 11.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) blue (d) red
- 12.🌈 Which colour of light is strongest in rgb(226, 49, 139)? (a) red (b) green (c) blue
- 13.🌈 Which colour is rgb(0, 0, 0)? (a) magenta (b) bright green (c) red (d) black
- 14.🌈 Which hex code is bright green? (a) #ffff00 (b) #00ff00 (c) #000000 (d) #ff0000
- 15.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) red (c) white (d) bright green
- 16.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) white (d) red
- 17.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) white (c) red (d) cyan
- 18.🌈 In #00c600 the green part is the hex number c6. What is it as a normal number?
- 19.🌈 Which colour of light is strongest in rgb(122, 229, 57)? (a) green (b) red (c) blue
- 20.🌈 Which colour of light is strongest in rgb(23, 196, 52)? (a) red (b) blue (c) green
- 21.🌈 Which colour is #ffff00? (a) white (b) yellow (c) cyan (d) black
- 22.🌈 Which hex code is yellow? (a) #ffff00 (b) #00ff00 (c) #ff00ff (d) #ffffff
- 23.🌈 Which colour is #ff00ff? (a) magenta (b) bright green (c) black (d) cyan
- 24.🌈 Which hex code is blue? (a) #00ff00 (b) #ff0000 (c) #0000ff (d) #ff00ff
- 25.🌈 Which colour is #ffffff? (a) white (b) black (c) magenta (d) blue
- 26.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) magenta (c) cyan (d) white
- 27.🌈 Which hex code is black? (a) #ffffff (b) #ff00ff (c) #000000 (d) #00ff00
- 28.🌈 Which colour is #000000? (a) magenta (b) yellow (c) blue (d) black
- 29.🌈 Which colour of light is strongest in rgb(159, 19, 79)? (a) red (b) blue (c) green
- 30.🌈 Which colour is #ff0000? (a) bright green (b) blue (c) red (d) yellow
- 31.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) bright green (c) blue (d) cyan
- 32.🌈 In #450000 the red part is the hex number 45. What is it as a normal number?
- 33.🌈 Which colour of light is strongest in rgb(6, 242, 100)? (a) red (b) green (c) blue
- 34.🌈 In #00fe00 the green part is the hex number fe. What is it as a normal number?
- 35.🌈 In #000024 the blue part is the hex number 24. What is it as a normal number?
- 36.🌈 In #000004 the blue part is the hex number 04. What is it as a normal number?
- 37.🌈 In #fb0000 the red part is the hex number fb. What is it as a normal number?
- 38.🌈 Which colour of light is strongest in rgb(83, 115, 195)? (a) red (b) green (c) blue
- 39.🌈 In #002e00 the green part is the hex number 2e. What is it as a normal number?
- 40.🌈 Which colour is #0000ff? (a) red (b) blue (c) black (d) magenta
Answer key
- 3
- F
- blue
- 92
- red
- green
- 255
- red
- bright green
- blue
- red
- red
- black
- #00ff00
- bright green
- blue
- white
- 198
- green
- green
- yellow
- #ffff00
- magenta
- #0000ff
- white
- magenta
- #000000
- black
- red
- red
- cyan
- 69
- green
- 254
- 36
- 4
- 251
- blue
- 46
- blue
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids