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.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) F (c) Z (d) J
- 2.🌈 Which colour is #ffff00? (a) white (b) yellow (c) red (d) bright green
- 3.🌈 Which hex code is cyan? (a) #0000ff (b) #000000 (c) #00ffff (d) #ffff00
- 4.🌈 Which colour of light is strongest in rgb(36, 140, 158)? (a) red (b) blue (c) green
- 5.🌈 Which colour is rgb(0, 255, 255)? (a) red (b) yellow (c) cyan (d) magenta
- 6.🌈 Which hex code is yellow? (a) #ffffff (b) #ffff00 (c) #00ff00 (d) #ff0000
- 7.🌈 Which colour of light is strongest in rgb(185, 103, 36)? (a) red (b) green (c) blue
- 8.🌈 Which colour of light is strongest in rgb(47, 86, 187)? (a) blue (b) green (c) red
- 9.🌈 In #007700 the green part is the hex number 77. What is it as a normal number?
- 10.🌈 Which colour of light is strongest in rgb(66, 211, 99)? (a) red (b) blue (c) green
- 11.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) red (d) blue
- 12.🌈 Which colour is #0000ff? (a) black (b) bright green (c) cyan (d) blue
- 13.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) green (d) black
- 14.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 99 (d) 1000
- 15.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 2 (d) 3
- 16.🌈 Which colour is rgb(255, 0, 255)? (a) blue (b) cyan (c) white (d) magenta
- 17.🌈 In #00008a the blue part is the hex number 8a. What is it as a normal number?
- 18.🌈 In #e50000 the red part is the hex number e5. What is it as a normal number?
- 19.🌈 Which hex code is magenta? (a) #ff0000 (b) #000000 (c) #00ffff (d) #ff00ff
- 20.🌈 In #002300 the green part is the hex number 23. What is it as a normal number?
- 21.🌈 In #00004b the blue part is the hex number 4b. What is it as a normal number?
- 22.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) red (c) bright green (d) magenta
- 23.🌈 Which colour is #ff0000? (a) blue (b) black (c) bright green (d) red
- 24.🌈 Which colour of light is strongest in rgb(26, 235, 81)? (a) green (b) red (c) blue
- 25.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) blue (c) white (d) bright green
- 26.🌈 In #00008d the blue part is the hex number 8d. What is it as a normal number?
- 27.🌈 In #c50000 the red part is the hex number c5. What is it as a normal number?
- 28.🌈 In #610000 the red part is the hex number 61. What is it as a normal number?
- 29.🌈 Which colour of light is strongest in rgb(15, 29, 190)? (a) red (b) blue (c) green
- 30.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) cyan (c) yellow (d) blue
- 31.🌈 In #240000 the red part is the hex number 24. What is it as a normal number?
- 32.🌈 Which colour is #000000? (a) red (b) yellow (c) cyan (d) black
- 33.🌈 Which hex code is black? (a) #ff00ff (b) #ffffff (c) #000000 (d) #ffff00
- 34.🌈 Which colour of light is strongest in rgb(192, 119, 76)? (a) green (b) red (c) blue
- 35.🌈 Which colour of light is strongest in rgb(26, 65, 203)? (a) green (b) red (c) blue
- 36.🌈 In #110000 the red part is the hex number 11. What is it as a normal number?
- 37.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) cyan (c) black (d) white
- 38.🌈 In #0000f1 the blue part is the hex number f1. What is it as a normal number?
- 39.🌈 In #00c000 the green part is the hex number c0. What is it as a normal number?
- 40.🌈 Which colour of light is strongest in rgb(107, 64, 203)? (a) blue (b) red (c) green
Answer key
- F
- yellow
- #00ffff
- blue
- cyan
- #ffff00
- red
- blue
- 119
- green
- blue
- blue
- red
- 255
- 3
- magenta
- 138
- 229
- #ff00ff
- 35
- 75
- red
- red
- green
- white
- 141
- 197
- 97
- blue
- blue
- 36
- black
- #000000
- red
- blue
- 17
- black
- 241
- 192
- blue
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids