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 first two digits give? (a) blue (b) green (c) black (d) red
- 2.🌈 Which colour of light is strongest in rgb(1, 167, 82)? (a) green (b) blue (c) red
- 3.🌈 Which colour is #0000ff? (a) black (b) blue (c) bright green (d) cyan
- 4.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) bright green (c) white (d) red
- 5.🌈 Which hex code is cyan? (a) #000000 (b) #ffffff (c) #ff00ff (d) #00ffff
- 6.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) cyan (c) black (d) bright green
- 7.🌈 Which colour is #ff0000? (a) cyan (b) red (c) magenta (d) blue
- 8.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) G (d) Z
- 9.🌈 In #005e00 the green part is the hex number 5e. What is it as a normal number?
- 10.🌈 In #0000f2 the blue part is the hex number f2. What is it as a normal number?
- 11.🌈 Which colour is #00ff00? (a) yellow (b) white (c) bright green (d) cyan
- 12.🌈 In #000000 the green part is the hex number 00. What is it as a normal number?
- 13.🌈 Which colour of light is strongest in rgb(250, 119, 0)? (a) blue (b) red (c) green
- 14.🌈 Which colour is #00ffff? (a) cyan (b) yellow (c) white (d) magenta
- 15.🌈 In #000600 the green part is the hex number 06. What is it as a normal number?
- 16.🌈 Which colour is #ffffff? (a) bright green (b) white (c) magenta (d) yellow
- 17.🌈 Which colour is #000000? (a) cyan (b) black (c) magenta (d) yellow
- 18.🌈 Which colour of light is strongest in rgb(85, 163, 126)? (a) red (b) blue (c) green
- 19.🌈 Which colour is #ff00ff? (a) magenta (b) blue (c) bright green (d) white
- 20.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) white (d) green
- 21.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 255 (c) 1000 (d) 99
- 22.🌈 Which hex code is red? (a) #ff00ff (b) #0000ff (c) #ffffff (d) #ff0000
- 23.🌈 In #930000 the red part is the hex number 93. What is it as a normal number?
- 24.🌈 In #0000e7 the blue part is the hex number e7. What is it as a normal number?
- 25.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 3 (d) 6
- 26.🌈 In #860000 the red part is the hex number 86. What is it as a normal number?
- 27.🌈 In #000057 the blue part is the hex number 57. What is it as a normal number?
- 28.🌈 Which hex code is white? (a) #0000ff (b) #ff0000 (c) #ffffff (d) #00ff00
- 29.🌈 Which colour of light is strongest in rgb(172, 94, 85)? (a) green (b) red (c) blue
- 30.🌈 In #00006f the blue part is the hex number 6f. What is it as a normal number?
- 31.🌈 Which colour is rgb(255, 0, 255)? (a) cyan (b) white (c) red (d) magenta
- 32.🌈 Which hex code is blue? (a) #00ff00 (b) #00ffff (c) #0000ff (d) #000000
- 33.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) cyan (c) bright green (d) magenta
- 34.🌈 In #000030 the blue part is the hex number 30. What is it as a normal number?
- 35.🌈 Which hex code is yellow? (a) #00ff00 (b) #ffff00 (c) #ff0000 (d) #0000ff
- 36.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) bright green (c) blue (d) white
- 37.🌈 Which colour of light is strongest in rgb(97, 155, 129)? (a) green (b) red (c) blue
- 38.🌈 In #000062 the blue part is the hex number 62. What is it as a normal number?
- 39.🌈 Which colour is #ffff00? (a) yellow (b) black (c) magenta (d) cyan
- 40.🌈 In #003600 the green part is the hex number 36. What is it as a normal number?
Answer key
- red
- green
- blue
- red
- #00ffff
- bright green
- red
- F
- 94
- 242
- bright green
- 0
- red
- cyan
- 6
- white
- black
- green
- magenta
- blue
- 255
- #ff0000
- 147
- 231
- 3
- 134
- 87
- #ffffff
- red
- 111
- magenta
- #0000ff
- cyan
- 48
- #ffff00
- blue
- green
- 98
- yellow
- 54
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids