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 magenta? (a) #ff00ff (b) #00ffff (c) #ffff00 (d) #ffffff
- 2.🌈 Which colour of light is strongest in rgb(25, 63, 215)? (a) blue (b) green (c) red
- 3.🌈 Which colour is rgb(255, 0, 255)? (a) cyan (b) magenta (c) red (d) black
- 4.🌈 Which hex code is white? (a) #ffff00 (b) #00ff00 (c) #ffffff (d) #0000ff
- 5.🌈 In #d30000 the red part is the hex number d3. What is it as a normal number?
- 6.🌈 Which colour of light is strongest in rgb(85, 227, 67)? (a) blue (b) red (c) green
- 7.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) magenta (c) white (d) yellow
- 8.🌈 Which hex code is yellow? (a) #ff00ff (b) #00ff00 (c) #ffff00 (d) #00ffff
- 9.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 1000 (d) 99
- 10.🌈 Which colour of light is strongest in rgb(171, 132, 102)? (a) green (b) blue (c) red
- 11.🌈 In #005d00 the green part is the hex number 5d. What is it as a normal number?
- 12.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) yellow (c) blue (d) magenta
- 13.🌈 Which colour is #ff0000? (a) white (b) black (c) red (d) cyan
- 14.🌈 In #130000 the red part is the hex number 13. What is it as a normal number?
- 15.🌈 In #080000 the red part is the hex number 08. What is it as a normal number?
- 16.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) white (c) green (d) blue
- 17.🌈 Which hex code is black? (a) #ff00ff (b) #ff0000 (c) #ffff00 (d) #000000
- 18.🌈 Which colour is #ffffff? (a) white (b) magenta (c) yellow (d) red
- 19.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) bright green (c) cyan (d) black
- 20.🌈 Which colour is #00ffff? (a) bright green (b) yellow (c) cyan (d) white
- 21.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) red (d) blue
- 22.🌈 Which colour is #00ff00? (a) bright green (b) red (c) yellow (d) cyan
- 23.🌈 In #00d900 the green part is the hex number d9. What is it as a normal number?
- 24.🌈 In #00b900 the green part is the hex number b9. What is it as a normal number?
- 25.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) magenta (c) white (d) cyan
- 26.🌈 Which colour is #ff00ff? (a) yellow (b) magenta (c) white (d) blue
- 27.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) G (d) F
- 28.🌈 Which colour of light is strongest in rgb(87, 184, 100)? (a) green (b) blue (c) red
- 29.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 6 (d) 3
- 30.🌈 Which colour of light is strongest in rgb(152, 54, 2)? (a) green (b) blue (c) red
- 31.🌈 In #590000 the red part is the hex number 59. What is it as a normal number?
- 32.🌈 Which hex code is cyan? (a) #00ffff (b) #000000 (c) #ffffff (d) #ffff00
- 33.🌈 In #b80000 the red part is the hex number b8. What is it as a normal number?
- 34.🌈 Which colour of light is strongest in rgb(103, 161, 126)? (a) blue (b) red (c) green
- 35.🌈 In #00ae00 the green part is the hex number ae. What is it as a normal number?
- 36.🌈 In #0000cf the blue part is the hex number cf. What is it as a normal number?
- 37.🌈 Which colour is rgb(255, 0, 0)? (a) magenta (b) blue (c) red (d) cyan
- 38.🌈 Which colour of light is strongest in rgb(157, 92, 28)? (a) red (b) blue (c) green
- 39.🌈 In #000017 the blue part is the hex number 17. What is it as a normal number?
- 40.🌈 Which colour of light is strongest in rgb(28, 123, 228)? (a) blue (b) green (c) red
Answer key
- #ff00ff
- blue
- magenta
- #ffffff
- 211
- green
- bright green
- #ffff00
- 255
- red
- 93
- yellow
- red
- 19
- 8
- blue
- #000000
- white
- black
- cyan
- red
- bright green
- 217
- 185
- cyan
- magenta
- F
- green
- 3
- red
- 89
- #00ffff
- 184
- green
- 174
- 207
- red
- red
- 23
- blue
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids