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.🌈 In #060000 the red part is the hex number 06. What is it as a normal number?
- 2.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) blue (d) red
- 3.🌈 Which hex code is bright green? (a) #ffffff (b) #ff00ff (c) #00ff00 (d) #0000ff
- 4.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 255 (c) 100 (d) 99
- 5.🌈 Which colour of light is strongest in rgb(30, 224, 108)? (a) blue (b) red (c) green
- 6.🌈 Which hex code is yellow? (a) #000000 (b) #ffffff (c) #00ffff (d) #ffff00
- 7.🌈 Which hex code is red? (a) #000000 (b) #ff00ff (c) #ff0000 (d) #0000ff
- 8.🌈 Which colour is #000000? (a) red (b) white (c) black (d) yellow
- 9.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) bright green (c) cyan (d) magenta
- 10.🌈 Which colour is #0000ff? (a) bright green (b) blue (c) red (d) cyan
- 11.🌈 Which hex code is blue? (a) #00ff00 (b) #000000 (c) #ff00ff (d) #0000ff
- 12.🌈 Which colour is #00ffff? (a) yellow (b) magenta (c) cyan (d) blue
- 13.🌈 Which colour is #00ff00? (a) red (b) blue (c) bright green (d) cyan
- 14.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
- 15.🌈 In #00ad00 the green part is the hex number ad. What is it as a normal number?
- 16.🌈 Which colour is rgb(0, 0, 0)? (a) blue (b) red (c) black (d) bright green
- 17.🌈 In #7b0000 the red part is the hex number 7b. What is it as a normal number?
- 18.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) F (d) J
- 19.🌈 Which colour is #ff0000? (a) black (b) cyan (c) blue (d) red
- 20.🌈 Which colour of light is strongest in rgb(133, 219, 88)? (a) green (b) blue (c) red
- 21.🌈 In #008000 the green part is the hex number 80. What is it as a normal number?
- 22.🌈 Which colour is #ffffff? (a) white (b) magenta (c) black (d) cyan
- 23.🌈 Which colour of light is strongest in rgb(223, 104, 12)? (a) red (b) green (c) blue
- 24.🌈 Which colour is #ff00ff? (a) cyan (b) magenta (c) black (d) white
- 25.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) blue (c) magenta (d) cyan
- 26.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) blue (c) red (d) black
- 27.🌈 In #009700 the green part is the hex number 97. What is it as a normal number?
- 28.🌈 Which colour of light is strongest in rgb(57, 45, 243)? (a) red (b) blue (c) green
- 29.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) magenta (c) red (d) cyan
- 30.🌈 In #000000 the green part is the hex number 00. What is it as a normal number?
- 31.🌈 Which colour is rgb(0, 255, 255)? (a) magenta (b) blue (c) bright green (d) cyan
- 32.🌈 Which colour of light is strongest in rgb(106, 15, 193)? (a) blue (b) red (c) green
- 33.🌈 Which colour of light is strongest in rgb(23, 125, 176)? (a) red (b) green (c) blue
- 34.🌈 In #00dc00 the green part is the hex number dc. What is it as a normal number?
- 35.🌈 Which hex code is cyan? (a) #ffffff (b) #000000 (c) #00ff00 (d) #00ffff
- 36.🌈 Which colour is rgb(255, 255, 255)? (a) red (b) bright green (c) magenta (d) white
- 37.🌈 Which colour of light is strongest in rgb(218, 120, 9)? (a) blue (b) green (c) red
- 38.🌈 Which colour is #ffff00? (a) blue (b) black (c) magenta (d) yellow
- 39.🌈 Which colour of light is strongest in rgb(243, 31, 17)? (a) red (b) blue (c) green
- 40.🌈 Which colour of light is strongest in rgb(216, 131, 17)? (a) red (b) green (c) blue
Answer key
- 6
- blue
- #00ff00
- 255
- green
- #ffff00
- #ff0000
- black
- bright green
- blue
- #0000ff
- cyan
- bright green
- red
- 173
- black
- 123
- F
- red
- green
- 128
- white
- red
- magenta
- blue
- yellow
- 151
- blue
- red
- 0
- cyan
- blue
- blue
- 220
- #00ffff
- white
- red
- yellow
- red
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids