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.🌈 Which hex code is cyan? (a) #00ffff (b) #000000 (c) #0000ff (d) #ff00ff
- 2.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) F (d) Z
- 3.🌈 Which hex code is blue? (a) #ff0000 (b) #ff00ff (c) #0000ff (d) #ffff00
- 4.🌈 Which colour is #ff0000? (a) magenta (b) bright green (c) yellow (d) red
- 5.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 6 (c) 3 (d) 4
- 6.🌈 Which colour of light is strongest in rgb(233, 37, 107)? (a) green (b) blue (c) red
- 7.🌈 Which colour of light is strongest in rgb(238, 117, 98)? (a) green (b) red (c) blue
- 8.🌈 Which hex code is yellow? (a) #ffffff (b) #ff00ff (c) #ffff00 (d) #00ff00
- 9.🌈 In #007400 the green part is the hex number 74. What is it as a normal number?
- 10.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 255 (d) 99
- 11.🌈 Which hex code is white? (a) #0000ff (b) #00ff00 (c) #00ffff (d) #ffffff
- 12.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) green (c) blue (d) black
- 13.🌈 Which hex code is magenta? (a) #ff00ff (b) #ffffff (c) #000000 (d) #0000ff
- 14.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) yellow (c) red (d) black
- 15.🌈 Which hex code is red? (a) #00ffff (b) #ffffff (c) #000000 (d) #ff0000
- 16.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) cyan (c) yellow (d) blue
- 17.🌈 Which colour is #0000ff? (a) black (b) red (c) blue (d) yellow
- 18.🌈 Which colour is rgb(0, 0, 255)? (a) white (b) blue (c) red (d) magenta
- 19.🌈 Which hex code is bright green? (a) #ffff00 (b) #00ffff (c) #00ff00 (d) #ff0000
- 20.🌈 Which colour is #00ff00? (a) blue (b) bright green (c) magenta (d) cyan
- 21.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) red (c) cyan (d) magenta
- 22.🌈 Which colour is rgb(255, 255, 255)? (a) red (b) bright green (c) black (d) white
- 23.🌈 Which colour of light is strongest in rgb(204, 59, 27)? (a) red (b) blue (c) green
- 24.🌈 In #4b0000 the red part is the hex number 4b. What is it as a normal number?
- 25.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) cyan (c) bright green (d) red
- 26.🌈 Which colour is #00ffff? (a) cyan (b) yellow (c) black (d) blue
- 27.🌈 Which colour is #ffffff? (a) blue (b) magenta (c) cyan (d) white
- 28.🌈 In #0000d5 the blue part is the hex number d5. What is it as a normal number?
- 29.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) magenta (c) yellow (d) bright green
- 30.🌈 In #000011 the blue part is the hex number 11. What is it as a normal number?
- 31.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) white (d) red
- 32.🌈 Which colour of light is strongest in rgb(221, 95, 0)? (a) red (b) green (c) blue
- 33.🌈 Which colour of light is strongest in rgb(3, 30, 197)? (a) blue (b) green (c) red
- 34.🌈 In #0000ac the blue part is the hex number ac. What is it as a normal number?
- 35.🌈 In #520000 the red part is the hex number 52. What is it as a normal number?
- 36.🌈 In #001500 the green part is the hex number 15. What is it as a normal number?
- 37.🌈 Which colour of light is strongest in rgb(252, 31, 92)? (a) green (b) red (c) blue
- 38.🌈 Which colour of light is strongest in rgb(44, 162, 37)? (a) green (b) red (c) blue
- 39.🌈 Which hex code is black? (a) #ffff00 (b) #ffffff (c) #000000 (d) #0000ff
- 40.🌈 In #fe0000 the red part is the hex number fe. What is it as a normal number?
Answer key
- #00ffff
- F
- #0000ff
- red
- 3
- red
- red
- #ffff00
- 116
- 255
- #ffffff
- red
- #ff00ff
- red
- #ff0000
- yellow
- blue
- blue
- #00ff00
- bright green
- magenta
- white
- red
- 75
- cyan
- cyan
- white
- 213
- bright green
- 17
- blue
- red
- blue
- 172
- 82
- 21
- red
- green
- #000000
- 254
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids