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 last two digits give? (a) blue (b) white (c) red (d) green
- 2.🌈 Which colour is #0000ff? (a) bright green (b) black (c) white (d) blue
- 3.🌈 Which hex code is red? (a) #ffff00 (b) #00ff00 (c) #000000 (d) #ff0000
- 4.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) red (d) blue
- 5.🌈 Which colour of light is strongest in rgb(120, 77, 195)? (a) red (b) blue (c) green
- 6.🌈 Which colour is #00ff00? (a) bright green (b) black (c) blue (d) yellow
- 7.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 2 (d) 6
- 8.🌈 Which colour of light is strongest in rgb(137, 2, 184)? (a) blue (b) green (c) red
- 9.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) Z (d) J
- 10.🌈 In #bc0000 the red part is the hex number bc. What is it as a normal number?
- 11.🌈 Which hex code is bright green? (a) #00ffff (b) #000000 (c) #00ff00 (d) #ffff00
- 12.🌈 In #0000d5 the blue part is the hex number d5. What is it as a normal number?
- 13.🌈 In #9d0000 the red part is the hex number 9d. What is it as a normal number?
- 14.🌈 In #3f0000 the red part is the hex number 3f. What is it as a normal number?
- 15.🌈 Which colour of light is strongest in rgb(88, 25, 213)? (a) green (b) blue (c) red
- 16.🌈 Which colour of light is strongest in rgb(204, 44, 1)? (a) blue (b) green (c) red
- 17.🌈 In #000012 the blue part is the hex number 12. What is it as a normal number?
- 18.🌈 In #000011 the blue part is the hex number 11. What is it as a normal number?
- 19.🌈 Which colour is #ff0000? (a) black (b) red (c) magenta (d) bright green
- 20.🌈 Which hex code is blue? (a) #ff0000 (b) #ffff00 (c) #0000ff (d) #ffffff
- 21.🌈 Which colour is #ff00ff? (a) cyan (b) magenta (c) bright green (d) blue
- 22.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) blue (c) yellow (d) black
- 23.🌈 Which colour is #ffffff? (a) blue (b) red (c) black (d) white
- 24.🌈 In #180000 the red part is the hex number 18. What is it as a normal number?
- 25.🌈 In #00e500 the green part is the hex number e5. What is it as a normal number?
- 26.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) red (c) bright green (d) black
- 27.🌈 Which colour of light is strongest in rgb(73, 253, 98)? (a) red (b) green (c) blue
- 28.🌈 In #000a00 the green part is the hex number 0a. What is it as a normal number?
- 29.🌈 In #0000f4 the blue part is the hex number f4. What is it as a normal number?
- 30.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) black (c) magenta (d) cyan
- 31.🌈 Which colour is #ffff00? (a) yellow (b) blue (c) red (d) white
- 32.🌈 In #1f0000 the red part is the hex number 1f. What is it as a normal number?
- 33.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 99 (d) 1000
- 34.🌈 Which colour of light is strongest in rgb(68, 96, 184)? (a) green (b) blue (c) red
- 35.🌈 Which colour of light is strongest in rgb(129, 170, 27)? (a) blue (b) red (c) green
- 36.🌈 In #000073 the blue part is the hex number 73. What is it as a normal number?
- 37.🌈 Which colour of light is strongest in rgb(34, 171, 3)? (a) red (b) blue (c) green
- 38.🌈 Which colour is #000000? (a) red (b) black (c) blue (d) magenta
- 39.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) black (c) red (d) cyan
- 40.🌈 Which hex code is black? (a) #00ffff (b) #ffff00 (c) #000000 (d) #ffffff
Answer key
- blue
- blue
- #ff0000
- red
- blue
- bright green
- 3
- blue
- F
- 188
- #00ff00
- 213
- 157
- 63
- blue
- red
- 18
- 17
- red
- #0000ff
- magenta
- blue
- white
- 24
- 229
- red
- green
- 10
- 244
- black
- yellow
- 31
- 255
- blue
- green
- 115
- green
- black
- cyan
- #000000
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids