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 yellow? (a) #ffff00 (b) #000000 (c) #00ff00 (d) #00ffff
- 2.🌈 Which colour is #0000ff? (a) cyan (b) white (c) blue (d) yellow
- 3.🌈 In #004100 the green part is the hex number 41. What is it as a normal number?
- 4.🌈 Which colour of light is strongest in rgb(111, 194, 6)? (a) blue (b) green (c) red
- 5.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 6 (c) 3 (d) 4
- 6.🌈 In #560000 the red part is the hex number 56. What is it as a normal number?
- 7.🌈 Which hex code is bright green? (a) #0000ff (b) #00ff00 (c) #ffff00 (d) #00ffff
- 8.🌈 In #000003 the blue part is the hex number 03. What is it as a normal number?
- 9.🌈 Which colour is #ffff00? (a) bright green (b) yellow (c) cyan (d) blue
- 10.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) green (d) blue
- 11.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) red (d) black
- 12.🌈 In #00f800 the green part is the hex number f8. What is it as a normal number?
- 13.🌈 Which colour is #000000? (a) magenta (b) black (c) blue (d) bright green
- 14.🌈 Which colour of light is strongest in rgb(166, 36, 25)? (a) blue (b) red (c) green
- 15.🌈 Which colour of light is strongest in rgb(9, 181, 135)? (a) blue (b) red (c) green
- 16.🌈 In #0000de the blue part is the hex number de. What is it as a normal number?
- 17.🌈 In #0000d2 the blue part is the hex number d2. What is it as a normal number?
- 18.🌈 Which colour is #00ffff? (a) yellow (b) blue (c) cyan (d) white
- 19.🌈 In #000034 the blue part is the hex number 34. What is it as a normal number?
- 20.🌈 Which hex code is blue? (a) #00ff00 (b) #ff00ff (c) #00ffff (d) #0000ff
- 21.🌈 Which colour is #ffffff? (a) cyan (b) white (c) blue (d) bright green
- 22.🌈 Which hex code is white? (a) #00ff00 (b) #ffff00 (c) #ffffff (d) #ff00ff
- 23.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 255 (c) 100 (d) 99
- 24.🌈 Which colour of light is strongest in rgb(104, 129, 169)? (a) green (b) red (c) blue
- 25.🌈 In #8e0000 the red part is the hex number 8e. What is it as a normal number?
- 26.🌈 In #fd0000 the red part is the hex number fd. What is it as a normal number?
- 27.🌈 Which hex code is cyan? (a) #ff00ff (b) #00ff00 (c) #00ffff (d) #ff0000
- 28.🌈 Which colour of light is strongest in rgb(252, 96, 23)? (a) red (b) green (c) blue
- 29.🌈 In #0000e6 the blue part is the hex number e6. What is it as a normal number?
- 30.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) J (d) F
- 31.🌈 Which colour of light is strongest in rgb(61, 26, 152)? (a) blue (b) red (c) green
- 32.🌈 In #00eb00 the green part is the hex number eb. What is it as a normal number?
- 33.🌈 Which hex code is magenta? (a) #0000ff (b) #ff00ff (c) #ff0000 (d) #00ff00
- 34.🌈 In #00a000 the green part is the hex number a0. What is it as a normal number?
- 35.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) magenta (c) white (d) red
- 36.🌈 Which colour of light is strongest in rgb(25, 170, 117)? (a) blue (b) green (c) red
- 37.🌈 Which colour of light is strongest in rgb(159, 86, 71)? (a) blue (b) green (c) red
- 38.🌈 Which colour is #ff0000? (a) black (b) bright green (c) red (d) yellow
- 39.🌈 Which colour of light is strongest in rgb(246, 25, 79)? (a) green (b) red (c) blue
- 40.🌈 Which colour of light is strongest in rgb(110, 11, 180)? (a) red (b) green (c) blue
Answer key
- #ffff00
- blue
- 65
- green
- 3
- 86
- #00ff00
- 3
- yellow
- blue
- red
- 248
- black
- red
- green
- 222
- 210
- cyan
- 52
- #0000ff
- white
- #ffffff
- 255
- blue
- 142
- 253
- #00ffff
- red
- 230
- F
- blue
- 235
- #ff00ff
- 160
- red
- green
- red
- red
- red
- blue
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids