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 black? (a) #0000ff (b) #00ffff (c) #ff00ff (d) #000000
- 2.🌈 Which colour is #0000ff? (a) red (b) blue (c) white (d) black
- 3.🌈 Which colour is #ff00ff? (a) black (b) bright green (c) white (d) magenta
- 4.🌈 Which colour of light is strongest in rgb(88, 20, 177)? (a) blue (b) green (c) red
- 5.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) green (d) red
- 6.🌈 Which colour of light is strongest in rgb(197, 115, 79)? (a) green (b) blue (c) red
- 7.🌈 Which hex code is magenta? (a) #ffff00 (b) #ff00ff (c) #00ff00 (d) #ff0000
- 8.🌈 Which colour is #000000? (a) yellow (b) magenta (c) black (d) blue
- 9.🌈 Which hex code is red? (a) #ffff00 (b) #ff0000 (c) #ff00ff (d) #0000ff
- 10.🌈 Which colour of light is strongest in rgb(96, 23, 151)? (a) blue (b) red (c) green
- 11.🌈 Which colour of light is strongest in rgb(111, 163, 131)? (a) blue (b) red (c) green
- 12.🌈 Which hex code is white? (a) #0000ff (b) #ff0000 (c) #ffffff (d) #000000
- 13.🌈 Which colour of light is strongest in rgb(204, 88, 128)? (a) blue (b) green (c) red
- 14.🌈 Which colour of light is strongest in rgb(124, 57, 152)? (a) green (b) blue (c) red
- 15.🌈 Which colour is #ffffff? (a) red (b) white (c) magenta (d) yellow
- 16.🌈 Which colour of light is strongest in rgb(60, 122, 158)? (a) red (b) blue (c) green
- 17.🌈 In #006500 the green part is the hex number 65. What is it as a normal number?
- 18.🌈 Which colour of light is strongest in rgb(13, 33, 235)? (a) blue (b) red (c) green
- 19.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) red (c) magenta (d) yellow
- 20.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) green (d) white
- 21.🌈 Which colour is rgb(255, 255, 0)? (a) cyan (b) magenta (c) white (d) yellow
- 22.🌈 Which colour of light is strongest in rgb(242, 76, 46)? (a) blue (b) green (c) red
- 23.🌈 In #0000d1 the blue part is the hex number d1. What is it as a normal number?
- 24.🌈 Which colour of light is strongest in rgb(110, 202, 112)? (a) red (b) green (c) blue
- 25.🌈 Which hex code is yellow? (a) #ffff00 (b) #ff0000 (c) #00ff00 (d) #ff00ff
- 26.🌈 Which colour is rgb(0, 0, 255)? (a) white (b) magenta (c) yellow (d) blue
- 27.🌈 Which colour is #ffff00? (a) cyan (b) red (c) blue (d) yellow
- 28.🌈 Which colour of light is strongest in rgb(53, 217, 26)? (a) green (b) blue (c) red
- 29.🌈 Which colour is #00ffff? (a) red (b) bright green (c) magenta (d) cyan
- 30.🌈 In #330000 the red part is the hex number 33. What is it as a normal number?
- 31.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) cyan (c) magenta (d) blue
- 32.🌈 Which colour of light is strongest in rgb(94, 163, 21)? (a) red (b) blue (c) green
- 33.🌈 In #770000 the red part is the hex number 77. What is it as a normal number?
- 34.🌈 In #008e00 the green part is the hex number 8e. What is it as a normal number?
- 35.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 1000 (d) 255
- 36.🌈 Which hex code is bright green? (a) #000000 (b) #ff00ff (c) #00ff00 (d) #0000ff
- 37.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) blue (c) black (d) magenta
- 38.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) black (c) blue (d) red
- 39.🌈 In #000091 the blue part is the hex number 91. What is it as a normal number?
- 40.🌈 In #00c200 the green part is the hex number c2. What is it as a normal number?
Answer key
- #000000
- blue
- magenta
- blue
- red
- red
- #ff00ff
- black
- #ff0000
- blue
- green
- #ffffff
- red
- blue
- white
- blue
- 101
- blue
- red
- blue
- yellow
- red
- 209
- green
- #ffff00
- blue
- yellow
- green
- cyan
- 51
- magenta
- green
- 119
- 142
- 255
- #00ff00
- black
- white
- 145
- 194
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids