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) J (b) F (c) Z (d) G
- 2.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) red (d) black
- 3.🌈 Which colour of light is strongest in rgb(135, 221, 59)? (a) blue (b) green (c) red
- 4.🌈 Which colour of light is strongest in rgb(107, 197, 107)? (a) blue (b) red (c) green
- 5.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) cyan (c) blue (d) yellow
- 6.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) blue (c) yellow (d) black
- 7.🌈 In #640000 the red part is the hex number 64. What is it as a normal number?
- 8.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 2 (d) 3
- 9.🌈 Which colour is #ffff00? (a) yellow (b) black (c) bright green (d) white
- 10.🌈 Which colour of light is strongest in rgb(177, 117, 133)? (a) red (b) blue (c) green
- 11.🌈 In #002400 the green part is the hex number 24. What is it as a normal number?
- 12.🌈 Which colour of light is strongest in rgb(51, 37, 170)? (a) red (b) blue (c) green
- 13.🌈 Which colour of light is strongest in rgb(75, 27, 188)? (a) red (b) green (c) blue
- 14.🌈 In #0000ee the blue part is the hex number ee. What is it as a normal number?
- 15.🌈 Which colour is #ffffff? (a) yellow (b) white (c) bright green (d) cyan
- 16.🌈 Which colour is #00ff00? (a) bright green (b) black (c) red (d) cyan
- 17.🌈 In #f10000 the red part is the hex number f1. What is it as a normal number?
- 18.🌈 In #e80000 the red part is the hex number e8. What is it as a normal number?
- 19.🌈 Which colour is #ff00ff? (a) cyan (b) magenta (c) white (d) red
- 20.🌈 Which colour of light is strongest in rgb(228, 92, 52)? (a) red (b) blue (c) green
- 21.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) black (c) red (d) cyan
- 22.🌈 Which colour is #00ffff? (a) cyan (b) red (c) bright green (d) blue
- 23.🌈 In #000014 the blue part is the hex number 14. What is it as a normal number?
- 24.🌈 In #8d0000 the red part is the hex number 8d. What is it as a normal number?
- 25.🌈 In #000063 the blue part is the hex number 63. What is it as a normal number?
- 26.🌈 In #370000 the red part is the hex number 37. What is it as a normal number?
- 27.🌈 In #3c0000 the red part is the hex number 3c. What is it as a normal number?
- 28.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 1000 (d) 100
- 29.🌈 Which colour of light is strongest in rgb(179, 140, 134)? (a) red (b) green (c) blue
- 30.🌈 Which colour of light is strongest in rgb(244, 22, 38)? (a) red (b) blue (c) green
- 31.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) blue (d) white
- 32.🌈 In #00ad00 the green part is the hex number ad. What is it as a normal number?
- 33.🌈 Which colour is #0000ff? (a) blue (b) cyan (c) bright green (d) black
- 34.🌈 Which colour is rgb(255, 255, 0)? (a) black (b) yellow (c) cyan (d) red
- 35.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) black (c) magenta (d) white
- 36.🌈 Which hex code is blue? (a) #ffffff (b) #00ff00 (c) #0000ff (d) #00ffff
- 37.🌈 In #00b700 the green part is the hex number b7. What is it as a normal number?
- 38.🌈 Which colour of light is strongest in rgb(221, 91, 63)? (a) green (b) blue (c) red
- 39.🌈 Which colour of light is strongest in rgb(90, 166, 49)? (a) blue (b) green (c) red
- 40.🌈 In #000041 the blue part is the hex number 41. What is it as a normal number?
Answer key
- F
- red
- green
- green
- bright green
- red
- 100
- 3
- yellow
- red
- 36
- blue
- blue
- 238
- white
- bright green
- 241
- 232
- magenta
- red
- cyan
- cyan
- 20
- 141
- 99
- 55
- 60
- 255
- red
- red
- blue
- 173
- blue
- yellow
- magenta
- #0000ff
- 183
- red
- green
- 65
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids