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 rgb(255, 0, 0)? (a) cyan (b) red (c) magenta (d) white
- 2.🌈 Which hex code is white? (a) #0000ff (b) #ffffff (c) #ff00ff (d) #000000
- 3.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) green (d) white
- 4.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 4 (d) 6
- 5.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) blue (d) red
- 6.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) yellow (c) blue (d) cyan
- 7.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) magenta (c) black (d) blue
- 8.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) F (d) G
- 9.🌈 Which colour of light is strongest in rgb(170, 130, 123)? (a) blue (b) green (c) red
- 10.🌈 Which hex code is magenta? (a) #ff00ff (b) #0000ff (c) #00ff00 (d) #ffffff
- 11.🌈 Which colour of light is strongest in rgb(234, 98, 38)? (a) red (b) green (c) blue
- 12.🌈 Which colour of light is strongest in rgb(214, 16, 120)? (a) blue (b) red (c) green
- 13.🌈 Which colour of light is strongest in rgb(4, 162, 46)? (a) blue (b) red (c) green
- 14.🌈 Which colour of light is strongest in rgb(140, 53, 194)? (a) red (b) blue (c) green
- 15.🌈 Which colour is #000000? (a) blue (b) white (c) magenta (d) black
- 16.🌈 Which colour of light is strongest in rgb(46, 75, 171)? (a) blue (b) green (c) red
- 17.🌈 In #420000 the red part is the hex number 42. What is it as a normal number?
- 18.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) blue (c) red (d) white
- 19.🌈 Which colour of light is strongest in rgb(2, 209, 16)? (a) green (b) blue (c) red
- 20.🌈 In #000010 the blue part is the hex number 10. What is it as a normal number?
- 21.🌈 Which colour is #ff0000? (a) red (b) white (c) blue (d) magenta
- 22.🌈 In #0000da the blue part is the hex number da. What is it as a normal number?
- 23.🌈 Which colour is rgb(0, 255, 0)? (a) cyan (b) bright green (c) magenta (d) red
- 24.🌈 In #00ef00 the green part is the hex number ef. What is it as a normal number?
- 25.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) black (c) blue (d) white
- 26.🌈 Which hex code is bright green? (a) #ffff00 (b) #00ffff (c) #0000ff (d) #00ff00
- 27.🌈 Which colour is #ff00ff? (a) magenta (b) red (c) white (d) yellow
- 28.🌈 Which hex code is blue? (a) #00ffff (b) #0000ff (c) #ff0000 (d) #ffff00
- 29.🌈 Which colour is #ffff00? (a) white (b) blue (c) magenta (d) yellow
- 30.🌈 Which colour is #0000ff? (a) black (b) blue (c) cyan (d) bright green
- 31.🌈 Which colour is #00ff00? (a) bright green (b) magenta (c) yellow (d) white
- 32.🌈 Which hex code is red? (a) #ffffff (b) #0000ff (c) #ff00ff (d) #ff0000
- 33.🌈 In #00e200 the green part is the hex number e2. What is it as a normal number?
- 34.🌈 In #00cc00 the green part is the hex number cc. What is it as a normal number?
- 35.🌈 Which colour of light is strongest in rgb(184, 131, 68)? (a) green (b) red (c) blue
- 36.🌈 In #590000 the red part is the hex number 59. What is it as a normal number?
- 37.🌈 Which hex code is black? (a) #000000 (b) #ff0000 (c) #ffff00 (d) #ffffff
- 38.🌈 In #002600 the green part is the hex number 26. What is it as a normal number?
- 39.🌈 Which colour is #00ffff? (a) cyan (b) blue (c) black (d) bright green
- 40.🌈 Which hex code is cyan? (a) #00ffff (b) #000000 (c) #00ff00 (d) #0000ff
Answer key
- red
- #ffffff
- blue
- 3
- red
- cyan
- black
- F
- red
- #ff00ff
- red
- red
- green
- blue
- black
- blue
- 66
- white
- green
- 16
- red
- 218
- bright green
- 239
- blue
- #00ff00
- magenta
- #0000ff
- yellow
- blue
- bright green
- #ff0000
- 226
- 204
- red
- 89
- #000000
- 38
- cyan
- #00ffff
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids