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 rgb(0, 255, 0)? (a) white (b) black (c) blue (d) bright green
- 2.🌈 Which colour is #ffff00? (a) cyan (b) yellow (c) white (d) blue
- 3.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 99 (c) 1000 (d) 100
- 4.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) red (d) blue
- 5.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) magenta (c) bright green (d) cyan
- 6.🌈 Which hex code is red? (a) #0000ff (b) #ffffff (c) #ff0000 (d) #000000
- 7.🌈 In #950000 the red part is the hex number 95. What is it as a normal number?
- 8.🌈 Which colour is #ff0000? (a) bright green (b) blue (c) red (d) white
- 9.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) blue (d) black
- 10.🌈 Which colour is #00ff00? (a) black (b) white (c) magenta (d) bright green
- 11.🌈 In #00001a the blue part is the hex number 1a. What is it as a normal number?
- 12.🌈 Which hex code is cyan? (a) #ffff00 (b) #000000 (c) #00ffff (d) #ffffff
- 13.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) white (c) black (d) red
- 14.🌈 Which colour is #000000? (a) cyan (b) blue (c) bright green (d) black
- 15.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) J (d) F
- 16.🌈 Which colour of light is strongest in rgb(200, 29, 7)? (a) red (b) blue (c) green
- 17.🌈 In #000081 the blue part is the hex number 81. What is it as a normal number?
- 18.🌈 Which colour of light is strongest in rgb(192, 21, 113)? (a) blue (b) green (c) red
- 19.🌈 Which hex code is blue? (a) #ff0000 (b) #ffffff (c) #0000ff (d) #00ffff
- 20.🌈 Which colour of light is strongest in rgb(228, 61, 3)? (a) green (b) blue (c) red
- 21.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 4 (d) 6
- 22.🌈 In #000032 the blue part is the hex number 32. What is it as a normal number?
- 23.🌈 Which colour of light is strongest in rgb(24, 201, 114)? (a) red (b) green (c) blue
- 24.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) red (c) bright green (d) black
- 25.🌈 Which colour of light is strongest in rgb(117, 231, 103)? (a) blue (b) red (c) green
- 26.🌈 Which colour is #0000ff? (a) cyan (b) yellow (c) white (d) blue
- 27.🌈 Which colour is #ff00ff? (a) red (b) cyan (c) bright green (d) magenta
- 28.🌈 Which colour is #00ffff? (a) bright green (b) cyan (c) blue (d) red
- 29.🌈 In #820000 the red part is the hex number 82. What is it as a normal number?
- 30.🌈 Which colour of light is strongest in rgb(197, 31, 4)? (a) green (b) red (c) blue
- 31.🌈 Which colour of light is strongest in rgb(21, 244, 54)? (a) blue (b) green (c) red
- 32.🌈 Which hex code is yellow? (a) #000000 (b) #ffff00 (c) #0000ff (d) #00ffff
- 33.🌈 In #830000 the red part is the hex number 83. What is it as a normal number?
- 34.🌈 In #a70000 the red part is the hex number a7. What is it as a normal number?
- 35.🌈 In #000095 the blue part is the hex number 95. What is it as a normal number?
- 36.🌈 In #000099 the blue part is the hex number 99. What is it as a normal number?
- 37.🌈 In #e90000 the red part is the hex number e9. What is it as a normal number?
- 38.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) white (c) bright green (d) magenta
- 39.🌈 Which colour of light is strongest in rgb(22, 232, 84)? (a) blue (b) red (c) green
- 40.🌈 Which colour of light is strongest in rgb(25, 179, 88)? (a) green (b) red (c) blue
Answer key
- bright green
- yellow
- 255
- blue
- magenta
- #ff0000
- 149
- red
- red
- bright green
- 26
- #00ffff
- black
- black
- F
- red
- 129
- red
- #0000ff
- red
- 3
- 50
- green
- cyan
- green
- blue
- magenta
- cyan
- 130
- red
- green
- #ffff00
- 131
- 167
- 149
- 153
- 233
- white
- green
- green
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids