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.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 1000 (d) 255
- 2.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 2 (d) 3
- 3.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) magenta (c) bright green (d) red
- 4.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) black (c) bright green (d) blue
- 5.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) blue (c) white (d) red
- 6.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) blue (d) white
- 7.🌈 Which colour is #ffffff? (a) yellow (b) red (c) white (d) magenta
- 8.🌈 Which hex code is yellow? (a) #00ffff (b) #ffff00 (c) #00ff00 (d) #000000
- 9.🌈 In #004d00 the green part is the hex number 4d. What is it as a normal number?
- 10.🌈 Which colour of light is strongest in rgb(169, 10, 29)? (a) red (b) green (c) blue
- 11.🌈 Which colour is #ffff00? (a) yellow (b) black (c) blue (d) bright green
- 12.🌈 Which hex code is magenta? (a) #00ff00 (b) #ff00ff (c) #ffffff (d) #ffff00
- 13.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) blue (d) red
- 14.🌈 Which colour of light is strongest in rgb(118, 39, 188)? (a) green (b) red (c) blue
- 15.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) G (d) Z
- 16.🌈 Which colour is #ff0000? (a) cyan (b) red (c) magenta (d) black
- 17.🌈 Which colour is #000000? (a) magenta (b) black (c) yellow (d) blue
- 18.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) black (c) yellow (d) magenta
- 19.🌈 Which hex code is red? (a) #000000 (b) #00ff00 (c) #ff0000 (d) #ffffff
- 20.🌈 In #0000e7 the blue part is the hex number e7. What is it as a normal number?
- 21.🌈 Which colour of light is strongest in rgb(30, 210, 94)? (a) blue (b) green (c) red
- 22.🌈 In #00000d the blue part is the hex number 0d. What is it as a normal number?
- 23.🌈 Which colour is #0000ff? (a) red (b) black (c) blue (d) yellow
- 24.🌈 In #002600 the green part is the hex number 26. What is it as a normal number?
- 25.🌈 In #830000 the red part is the hex number 83. What is it as a normal number?
- 26.🌈 In #4e0000 the red part is the hex number 4e. What is it as a normal number?
- 27.🌈 Which colour of light is strongest in rgb(39, 35, 160)? (a) blue (b) red (c) green
- 28.🌈 Which hex code is black? (a) #000000 (b) #ff00ff (c) #00ffff (d) #00ff00
- 29.🌈 Which hex code is bright green? (a) #ffff00 (b) #ff0000 (c) #00ffff (d) #00ff00
- 30.🌈 In #0000e5 the blue part is the hex number e5. What is it as a normal number?
- 31.🌈 Which colour of light is strongest in rgb(20, 117, 169)? (a) blue (b) green (c) red
- 32.🌈 Which colour of light is strongest in rgb(6, 216, 24)? (a) green (b) red (c) blue
- 33.🌈 Which colour of light is strongest in rgb(58, 163, 32)? (a) red (b) blue (c) green
- 34.🌈 In #8c0000 the red part is the hex number 8c. What is it as a normal number?
- 35.🌈 Which colour is #ff00ff? (a) red (b) blue (c) magenta (d) bright green
- 36.🌈 Which hex code is blue? (a) #0000ff (b) #000000 (c) #00ff00 (d) #ffffff
- 37.🌈 Which hex code is cyan? (a) #0000ff (b) #ffffff (c) #00ffff (d) #000000
- 38.🌈 In #2c0000 the red part is the hex number 2c. What is it as a normal number?
- 39.🌈 Which colour is #00ff00? (a) bright green (b) white (c) yellow (d) red
- 40.🌈 Which colour of light is strongest in rgb(84, 59, 195)? (a) blue (b) green (c) red
Answer key
- 255
- 3
- blue
- bright green
- black
- blue
- white
- #ffff00
- 77
- red
- yellow
- #ff00ff
- red
- blue
- F
- red
- black
- red
- #ff0000
- 231
- green
- 13
- blue
- 38
- 131
- 78
- blue
- #000000
- #00ff00
- 229
- blue
- green
- green
- 140
- magenta
- #0000ff
- #00ffff
- 44
- bright green
- blue
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids