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 colour is #00ff00? (a) bright green (b) yellow (c) red (d) blue
- 2.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) white (c) blue (d) green
- 3.🌈 In #00dc00 the green part is the hex number dc. What is it as a normal number?
- 4.🌈 Which colour is #ff0000? (a) yellow (b) white (c) cyan (d) red
- 5.🌈 Which colour of light is strongest in rgb(116, 154, 26)? (a) green (b) blue (c) red
- 6.🌈 Which hex code is red? (a) #00ff00 (b) #000000 (c) #ff0000 (d) #ffffff
- 7.🌈 Which colour of light is strongest in rgb(238, 115, 118)? (a) green (b) blue (c) red
- 8.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 4 (d) 6
- 9.🌈 In #170000 the red part is the hex number 17. What is it as a normal number?
- 10.🌈 Which colour is #ffff00? (a) white (b) yellow (c) cyan (d) red
- 11.🌈 Which hex code is white? (a) #ff0000 (b) #00ffff (c) #ffff00 (d) #ffffff
- 12.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 99 (d) 255
- 13.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) F (d) J
- 14.🌈 Which colour of light is strongest in rgb(178, 64, 27)? (a) red (b) blue (c) green
- 15.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) black (d) blue
- 16.🌈 Which colour of light is strongest in rgb(24, 238, 44)? (a) blue (b) green (c) red
- 17.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) blue (c) yellow (d) white
- 18.🌈 In #0000db the blue part is the hex number db. What is it as a normal number?
- 19.🌈 In #0000dd the blue part is the hex number dd. What is it as a normal number?
- 20.🌈 In #002f00 the green part is the hex number 2f. What is it as a normal number?
- 21.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) cyan (c) red (d) yellow
- 22.🌈 In #840000 the red part is the hex number 84. What is it as a normal number?
- 23.🌈 Which colour is #ff00ff? (a) yellow (b) black (c) magenta (d) bright green
- 24.🌈 Which colour of light is strongest in rgb(196, 27, 99)? (a) green (b) blue (c) red
- 25.🌈 Which colour of light is strongest in rgb(62, 172, 106)? (a) blue (b) red (c) green
- 26.🌈 Which colour of light is strongest in rgb(23, 106, 151)? (a) blue (b) green (c) red
- 27.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) yellow (c) magenta (d) cyan
- 28.🌈 Which colour is #000000? (a) yellow (b) cyan (c) black (d) white
- 29.🌈 In #500000 the red part is the hex number 50. What is it as a normal number?
- 30.🌈 Which colour of light is strongest in rgb(174, 77, 36)? (a) blue (b) green (c) red
- 31.🌈 Which colour of light is strongest in rgb(198, 70, 53)? (a) blue (b) green (c) red
- 32.🌈 In #00c600 the green part is the hex number c6. What is it as a normal number?
- 33.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) black (c) bright green (d) white
- 34.🌈 Which colour of light is strongest in rgb(218, 79, 7)? (a) green (b) red (c) blue
- 35.🌈 Which hex code is blue? (a) #0000ff (b) #000000 (c) #ff00ff (d) #00ffff
- 36.🌈 Which hex code is black? (a) #ff0000 (b) #0000ff (c) #00ffff (d) #000000
- 37.🌈 Which colour of light is strongest in rgb(216, 49, 5)? (a) blue (b) red (c) green
- 38.🌈 In #8f0000 the red part is the hex number 8f. What is it as a normal number?
- 39.🌈 In #0000fc the blue part is the hex number fc. What is it as a normal number?
- 40.🌈 Which hex code is yellow? (a) #ffffff (b) #ff00ff (c) #ffff00 (d) #000000
Answer key
- bright green
- blue
- 220
- red
- green
- #ff0000
- red
- 3
- 23
- yellow
- #ffffff
- 255
- F
- red
- red
- green
- red
- 219
- 221
- 47
- blue
- 132
- magenta
- red
- green
- blue
- cyan
- black
- 80
- red
- red
- 198
- black
- red
- #0000ff
- #000000
- red
- 143
- 252
- #ffff00
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids