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 #000000? (a) magenta (b) cyan (c) bright green (d) black
- 2.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 255 (d) 1000
- 3.🌈 In #00c000 the green part is the hex number c0. What is it as a normal number?
- 4.🌈 Which colour is #ffff00? (a) yellow (b) blue (c) black (d) magenta
- 5.🌈 Which hex code is cyan? (a) #ff00ff (b) #00ffff (c) #ffff00 (d) #ffffff
- 6.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) black (c) white (d) yellow
- 7.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) blue (d) green
- 8.🌈 Which colour of light is strongest in rgb(204, 10, 0)? (a) green (b) red (c) blue
- 9.🌈 In #0000f0 the blue part is the hex number f0. What is it as a normal number?
- 10.🌈 Which colour is #ffffff? (a) blue (b) white (c) bright green (d) magenta
- 11.🌈 Which colour of light is strongest in rgb(102, 185, 129)? (a) red (b) green (c) blue
- 12.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) G (d) Z
- 13.🌈 Which colour of light is strongest in rgb(192, 6, 86)? (a) red (b) blue (c) green
- 14.🌈 In #0000fe the blue part is the hex number fe. What is it as a normal number?
- 15.🌈 Which hex code is white? (a) #00ffff (b) #ff0000 (c) #000000 (d) #ffffff
- 16.🌈 In #9b0000 the red part is the hex number 9b. What is it as a normal number?
- 17.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) black (c) bright green (d) yellow
- 18.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) magenta (c) red (d) bright green
- 19.🌈 Which colour is #00ff00? (a) red (b) black (c) yellow (d) bright green
- 20.🌈 Which colour of light is strongest in rgb(51, 132, 177)? (a) red (b) green (c) blue
- 21.🌈 Which hex code is black? (a) #ff0000 (b) #0000ff (c) #000000 (d) #ffffff
- 22.🌈 Which colour of light is strongest in rgb(231, 128, 0)? (a) red (b) blue (c) green
- 23.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) cyan (c) blue (d) magenta
- 24.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 4 (d) 6
- 25.🌈 Which colour of light is strongest in rgb(102, 140, 160)? (a) green (b) red (c) blue
- 26.🌈 Which hex code is red? (a) #ffff00 (b) #0000ff (c) #ff0000 (d) #ff00ff
- 27.🌈 Which colour of light is strongest in rgb(194, 14, 30)? (a) green (b) blue (c) red
- 28.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) green (d) black
- 29.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) cyan (c) blue (d) white
- 30.🌈 In #00005e the blue part is the hex number 5e. What is it as a normal number?
- 31.🌈 Which colour of light is strongest in rgb(219, 61, 74)? (a) red (b) green (c) blue
- 32.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) cyan (c) bright green (d) white
- 33.🌈 Which colour of light is strongest in rgb(184, 111, 109)? (a) green (b) blue (c) red
- 34.🌈 In #0000f1 the blue part is the hex number f1. What is it as a normal number?
- 35.🌈 Which colour is #ff0000? (a) yellow (b) blue (c) red (d) bright green
- 36.🌈 In #0000a9 the blue part is the hex number a9. What is it as a normal number?
- 37.🌈 In #0000b7 the blue part is the hex number b7. What is it as a normal number?
- 38.🌈 Which colour of light is strongest in rgb(11, 244, 115)? (a) blue (b) red (c) green
- 39.🌈 Which colour is #00ffff? (a) yellow (b) cyan (c) magenta (d) white
- 40.🌈 Which colour of light is strongest in rgb(119, 173, 38)? (a) blue (b) green (c) red
Answer key
- black
- 255
- 192
- yellow
- #00ffff
- yellow
- blue
- red
- 240
- white
- green
- F
- red
- 254
- #ffffff
- 155
- black
- red
- bright green
- blue
- #000000
- red
- cyan
- 3
- blue
- #ff0000
- red
- red
- blue
- 94
- red
- bright green
- red
- 241
- red
- 169
- 183
- green
- cyan
- green
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids