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) blue (b) black (c) magenta (d) bright green
- 2.🌈 Which colour of light is strongest in rgb(183, 11, 82)? (a) green (b) red (c) blue
- 3.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) red (d) green
- 4.🌈 Which colour is #ff0000? (a) white (b) magenta (c) red (d) bright green
- 5.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) magenta (c) yellow (d) white
- 6.🌈 Which hex code is blue? (a) #ff0000 (b) #ffff00 (c) #0000ff (d) #000000
- 7.🌈 Which colour of light is strongest in rgb(203, 132, 130)? (a) blue (b) red (c) green
- 8.🌈 Which hex code is white? (a) #ffff00 (b) #00ffff (c) #ffffff (d) #00ff00
- 9.🌈 Which colour is rgb(255, 0, 255)? (a) cyan (b) bright green (c) magenta (d) blue
- 10.🌈 Which hex code is red? (a) #00ff00 (b) #ffffff (c) #ff00ff (d) #ff0000
- 11.🌈 In #000000 the blue part is the hex number 00. What is it as a normal number?
- 12.🌈 Which hex code is bright green? (a) #ffffff (b) #0000ff (c) #ff0000 (d) #00ff00
- 13.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) black (c) bright green (d) red
- 14.🌈 Which colour is #ffffff? (a) cyan (b) magenta (c) white (d) red
- 15.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) yellow (c) white (d) black
- 16.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) white (c) cyan (d) magenta
- 17.🌈 Which colour is #ffff00? (a) magenta (b) blue (c) bright green (d) yellow
- 18.🌈 Which hex code is black? (a) #ffff00 (b) #0000ff (c) #00ff00 (d) #000000
- 19.🌈 Which colour of light is strongest in rgb(212, 93, 42)? (a) green (b) red (c) blue
- 20.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) red (d) green
- 21.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) G (d) Z
- 22.🌈 Which colour of light is strongest in rgb(159, 78, 119)? (a) blue (b) green (c) red
- 23.🌈 Which colour of light is strongest in rgb(123, 254, 4)? (a) green (b) red (c) blue
- 24.🌈 Which hex code is yellow? (a) #0000ff (b) #ffffff (c) #ffff00 (d) #ff0000
- 25.🌈 In #140000 the red part is the hex number 14. What is it as a normal number?
- 26.🌈 In #a70000 the red part is the hex number a7. What is it as a normal number?
- 27.🌈 Which colour of light is strongest in rgb(68, 235, 115)? (a) red (b) blue (c) green
- 28.🌈 In #1d0000 the red part is the hex number 1d. What is it as a normal number?
- 29.🌈 Which colour is #000000? (a) white (b) yellow (c) cyan (d) black
- 30.🌈 In #0000e9 the blue part is the hex number e9. What is it as a normal number?
- 31.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 255 (d) 99
- 32.🌈 In #0000f8 the blue part is the hex number f8. What is it as a normal number?
- 33.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) black (c) blue (d) red
- 34.🌈 Which colour of light is strongest in rgb(165, 92, 134)? (a) green (b) red (c) blue
- 35.🌈 Which colour is #00ff00? (a) yellow (b) bright green (c) cyan (d) blue
- 36.🌈 Which colour of light is strongest in rgb(235, 128, 85)? (a) green (b) red (c) blue
- 37.🌈 Which colour is #00ffff? (a) yellow (b) bright green (c) cyan (d) black
- 38.🌈 Which colour of light is strongest in rgb(3, 88, 157)? (a) green (b) blue (c) red
- 39.🌈 In #000017 the blue part is the hex number 17. What is it as a normal number?
- 40.🌈 In #00006e the blue part is the hex number 6e. What is it as a normal number?
Answer key
- blue
- red
- blue
- red
- yellow
- #0000ff
- red
- #ffffff
- magenta
- #ff0000
- 0
- #00ff00
- bright green
- white
- black
- white
- yellow
- #000000
- red
- red
- F
- red
- green
- #ffff00
- 20
- 167
- green
- 29
- black
- 233
- 255
- 248
- red
- red
- bright green
- red
- cyan
- blue
- 23
- 110
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids