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 of light is strongest in rgb(126, 233, 5)? (a) red (b) blue (c) green
- 2.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) bright green (c) red (d) white
- 3.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) red (d) black
- 4.🌈 Which hex code is cyan? (a) #0000ff (b) #000000 (c) #00ffff (d) #ff00ff
- 5.🌈 Which colour of light is strongest in rgb(100, 65, 169)? (a) blue (b) red (c) green
- 6.🌈 Which colour is #00ffff? (a) magenta (b) yellow (c) cyan (d) bright green
- 7.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 99 (c) 255 (d) 100
- 8.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) green (c) white (d) red
- 9.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) red (c) black (d) magenta
- 10.🌈 Which colour of light is strongest in rgb(123, 20, 172)? (a) green (b) blue (c) red
- 11.🌈 Which colour of light is strongest in rgb(47, 119, 204)? (a) red (b) green (c) blue
- 12.🌈 In #004500 the green part is the hex number 45. What is it as a normal number?
- 13.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 3 (d) 6
- 14.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) black (c) blue (d) red
- 15.🌈 Which colour is #ffff00? (a) bright green (b) white (c) yellow (d) blue
- 16.🌈 Which colour of light is strongest in rgb(128, 102, 255)? (a) green (b) blue (c) red
- 17.🌈 Which colour is #ffffff? (a) cyan (b) white (c) magenta (d) blue
- 18.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) G (d) F
- 19.🌈 Which colour is rgb(0, 255, 255)? (a) magenta (b) white (c) red (d) cyan
- 20.🌈 In #000c00 the green part is the hex number 0c. What is it as a normal number?
- 21.🌈 Which colour of light is strongest in rgb(97, 199, 51)? (a) red (b) blue (c) green
- 22.🌈 In #400000 the red part is the hex number 40. What is it as a normal number?
- 23.🌈 Which colour of light is strongest in rgb(251, 134, 45)? (a) green (b) red (c) blue
- 24.🌈 In #c10000 the red part is the hex number c1. What is it as a normal number?
- 25.🌈 Which colour is #ff0000? (a) yellow (b) black (c) magenta (d) red
- 26.🌈 In #006000 the green part is the hex number 60. What is it as a normal number?
- 27.🌈 Which colour of light is strongest in rgb(160, 122, 5)? (a) green (b) blue (c) red
- 28.🌈 In #000029 the blue part is the hex number 29. What is it as a normal number?
- 29.🌈 Which colour of light is strongest in rgb(164, 18, 33)? (a) green (b) red (c) blue
- 30.🌈 Which hex code is black? (a) #0000ff (b) #000000 (c) #00ffff (d) #ffff00
- 31.🌈 Which hex code is magenta? (a) #ff00ff (b) #000000 (c) #0000ff (d) #00ff00
- 32.🌈 Which colour of light is strongest in rgb(123, 209, 9)? (a) red (b) green (c) blue
- 33.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) blue (c) red (d) cyan
- 34.🌈 Which colour is #00ff00? (a) blue (b) magenta (c) bright green (d) red
- 35.🌈 Which colour of light is strongest in rgb(158, 84, 110)? (a) red (b) blue (c) green
- 36.🌈 Which colour is rgb(0, 0, 0)? (a) magenta (b) bright green (c) red (d) black
- 37.🌈 Which colour of light is strongest in rgb(202, 130, 40)? (a) green (b) blue (c) red
- 38.🌈 Which colour of light is strongest in rgb(108, 93, 218)? (a) green (b) blue (c) red
- 39.🌈 Which colour of light is strongest in rgb(244, 116, 88)? (a) red (b) green (c) blue
- 40.🌈 In #cc0000 the red part is the hex number cc. What is it as a normal number?
Answer key
- green
- white
- red
- #00ffff
- blue
- cyan
- 255
- blue
- magenta
- blue
- blue
- 69
- 3
- blue
- yellow
- blue
- white
- F
- cyan
- 12
- green
- 64
- red
- 193
- red
- 96
- red
- 41
- red
- #000000
- #ff00ff
- green
- bright green
- bright green
- red
- black
- red
- blue
- red
- 204
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids