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 last two digits give? (a) white (b) green (c) blue (d) red
- 2.🌈 In #002100 the green part is the hex number 21. What is it as a normal number?
- 3.🌈 Which colour is #00ffff? (a) black (b) cyan (c) yellow (d) magenta
- 4.🌈 Which hex code is blue? (a) #0000ff (b) #00ffff (c) #00ff00 (d) #ffff00
- 5.🌈 Which colour is #ffff00? (a) yellow (b) red (c) blue (d) magenta
- 6.🌈 Which colour is #ffffff? (a) white (b) blue (c) red (d) cyan
- 7.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) blue (c) white (d) yellow
- 8.🌈 Which colour is rgb(255, 0, 0)? (a) white (b) red (c) black (d) cyan
- 9.🌈 In #00bb00 the green part is the hex number bb. What is it as a normal number?
- 10.🌈 In #00fb00 the green part is the hex number fb. What is it as a normal number?
- 11.🌈 In #003600 the green part is the hex number 36. What is it as a normal number?
- 12.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
- 13.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) G (d) F
- 14.🌈 In #000085 the blue part is the hex number 85. What is it as a normal number?
- 15.🌈 Which colour is #0000ff? (a) blue (b) cyan (c) magenta (d) bright green
- 16.🌈 Which colour is rgb(0, 255, 0)? (a) magenta (b) black (c) bright green (d) cyan
- 17.🌈 In #b10000 the red part is the hex number b1. What is it as a normal number?
- 18.🌈 Which colour is #000000? (a) red (b) blue (c) black (d) white
- 19.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) red (c) black (d) magenta
- 20.🌈 Which hex code is red? (a) #0000ff (b) #000000 (c) #ff0000 (d) #ff00ff
- 21.🌈 In #00001d the blue part is the hex number 1d. What is it as a normal number?
- 22.🌈 Which hex code is bright green? (a) #ff0000 (b) #000000 (c) #00ffff (d) #00ff00
- 23.🌈 Which hex code is yellow? (a) #0000ff (b) #00ff00 (c) #ff00ff (d) #ffff00
- 24.🌈 Which hex code is cyan? (a) #0000ff (b) #00ffff (c) #000000 (d) #ff0000
- 25.🌈 Which colour of light is strongest in rgb(205, 39, 36)? (a) red (b) green (c) blue
- 26.🌈 Which colour of light is strongest in rgb(175, 92, 25)? (a) red (b) blue (c) green
- 27.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) cyan (c) red (d) yellow
- 28.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 3 (d) 2
- 29.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) white (c) yellow (d) blue
- 30.🌈 In #0000fe the blue part is the hex number fe. What is it as a normal number?
- 31.🌈 Which colour is #ff00ff? (a) magenta (b) yellow (c) cyan (d) white
- 32.🌈 Which colour of light is strongest in rgb(103, 23, 193)? (a) red (b) green (c) blue
- 33.🌈 Which colour is #00ff00? (a) white (b) blue (c) bright green (d) red
- 34.🌈 In #200000 the red part is the hex number 20. What is it as a normal number?
- 35.🌈 Which hex code is magenta? (a) #00ffff (b) #ffff00 (c) #00ff00 (d) #ff00ff
- 36.🌈 In #400000 the red part is the hex number 40. What is it as a normal number?
- 37.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) red (c) black (d) bright green
- 38.🌈 Which colour of light is strongest in rgb(234, 23, 51)? (a) green (b) red (c) blue
- 39.🌈 Which colour is #ff0000? (a) white (b) blue (c) red (d) bright green
- 40.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 1000 (c) 100 (d) 255
Answer key
- blue
- 33
- cyan
- #0000ff
- yellow
- white
- blue
- red
- 187
- 251
- 54
- red
- F
- 133
- blue
- bright green
- 177
- black
- magenta
- #ff0000
- 29
- #00ff00
- #ffff00
- #00ffff
- red
- red
- white
- 3
- yellow
- 254
- magenta
- blue
- bright green
- 32
- #ff00ff
- 64
- black
- red
- red
- 255
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids