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 #0000ff? (a) white (b) yellow (c) blue (d) red
- 2.🌈 Which hex code is red? (a) #ffffff (b) #000000 (c) #ff0000 (d) #00ff00
- 3.🌈 Which colour is #00ff00? (a) blue (b) cyan (c) bright green (d) magenta
- 4.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) F (d) J
- 5.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) red (d) blue
- 6.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 6 (c) 4 (d) 3
- 7.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) blue (d) green
- 8.🌈 Which hex code is magenta? (a) #ffffff (b) #ff00ff (c) #00ff00 (d) #0000ff
- 9.🌈 Which colour is #000000? (a) magenta (b) bright green (c) red (d) black
- 10.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) black (c) red (d) magenta
- 11.🌈 Which hex code is blue? (a) #ff00ff (b) #00ffff (c) #0000ff (d) #00ff00
- 12.🌈 Which colour is #ff0000? (a) red (b) bright green (c) blue (d) black
- 13.🌈 In #007300 the green part is the hex number 73. What is it as a normal number?
- 14.🌈 Which colour of light is strongest in rgb(106, 165, 74)? (a) blue (b) green (c) red
- 15.🌈 Which colour of light is strongest in rgb(209, 87, 9)? (a) red (b) green (c) blue
- 16.🌈 In #00001b the blue part is the hex number 1b. What is it as a normal number?
- 17.🌈 In #d90000 the red part is the hex number d9. What is it as a normal number?
- 18.🌈 Which colour of light is strongest in rgb(80, 152, 32)? (a) green (b) blue (c) red
- 19.🌈 Which colour is #ffff00? (a) magenta (b) blue (c) white (d) yellow
- 20.🌈 Which hex code is yellow? (a) #00ffff (b) #ffff00 (c) #ff0000 (d) #00ff00
- 21.🌈 Which colour is #00ffff? (a) blue (b) magenta (c) cyan (d) bright green
- 22.🌈 Which hex code is white? (a) #ff00ff (b) #ffffff (c) #00ff00 (d) #ffff00
- 23.🌈 Which colour of light is strongest in rgb(52, 161, 6)? (a) blue (b) red (c) green
- 24.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) bright green (c) black (d) red
- 25.🌈 Which colour of light is strongest in rgb(254, 97, 79)? (a) blue (b) red (c) green
- 26.🌈 Which colour of light is strongest in rgb(68, 93, 224)? (a) blue (b) red (c) green
- 27.🌈 Which colour is #ff00ff? (a) blue (b) white (c) cyan (d) magenta
- 28.🌈 Which colour of light is strongest in rgb(37, 182, 2)? (a) red (b) blue (c) green
- 29.🌈 Which colour of light is strongest in rgb(135, 20, 195)? (a) red (b) blue (c) green
- 30.🌈 Which colour of light is strongest in rgb(164, 3, 115)? (a) red (b) green (c) blue
- 31.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 255 (c) 99 (d) 100
- 32.🌈 Which colour is rgb(255, 0, 0)? (a) white (b) red (c) black (d) cyan
- 33.🌈 In #000083 the blue part is the hex number 83. What is it as a normal number?
- 34.🌈 Which colour is rgb(255, 255, 0)? (a) black (b) red (c) blue (d) yellow
- 35.🌈 Which colour of light is strongest in rgb(222, 116, 29)? (a) green (b) red (c) blue
- 36.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) magenta (c) yellow (d) black
- 37.🌈 Which colour of light is strongest in rgb(26, 46, 228)? (a) blue (b) green (c) red
- 38.🌈 Which colour of light is strongest in rgb(233, 59, 98)? (a) green (b) red (c) blue
- 39.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) black (c) blue (d) red
- 40.🌈 In #a90000 the red part is the hex number a9. What is it as a normal number?
Answer key
- blue
- #ff0000
- bright green
- F
- blue
- 3
- red
- #ff00ff
- black
- magenta
- #0000ff
- red
- 115
- green
- red
- 27
- 217
- green
- yellow
- #ffff00
- cyan
- #ffffff
- green
- black
- red
- blue
- magenta
- green
- blue
- red
- 255
- red
- 131
- yellow
- red
- blue
- blue
- red
- white
- 169
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids