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(0, 0, 255)? (a) black (b) magenta (c) red (d) blue
- 2.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) magenta (c) bright green (d) white
- 3.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) J (d) F
- 4.🌈 Which hex code is bright green? (a) #ffffff (b) #000000 (c) #00ffff (d) #00ff00
- 5.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) green (c) white (d) red
- 6.🌈 Which colour is #ff0000? (a) bright green (b) yellow (c) red (d) black
- 7.🌈 Which hex code is red? (a) #0000ff (b) #ff0000 (c) #000000 (d) #ffffff
- 8.🌈 Which colour of light is strongest in rgb(20, 69, 160)? (a) green (b) blue (c) red
- 9.🌈 In #001a00 the green part is the hex number 1a. What is it as a normal number?
- 10.🌈 Which colour is rgb(255, 0, 255)? (a) red (b) magenta (c) yellow (d) cyan
- 11.🌈 Which colour is #00ff00? (a) red (b) bright green (c) blue (d) white
- 12.🌈 Which colour is #ffffff? (a) black (b) yellow (c) white (d) cyan
- 13.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 6 (d) 4
- 14.🌈 In #470000 the red part is the hex number 47. What is it as a normal number?
- 15.🌈 Which hex code is cyan? (a) #000000 (b) #00ffff (c) #0000ff (d) #ffff00
- 16.🌈 In #020000 the red part is the hex number 02. What is it as a normal number?
- 17.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 99 (d) 1000
- 18.🌈 Which colour of light is strongest in rgb(41, 22, 236)? (a) red (b) green (c) blue
- 19.🌈 Which hex code is white? (a) #ffff00 (b) #0000ff (c) #ffffff (d) #000000
- 20.🌈 Which colour is #000000? (a) black (b) white (c) yellow (d) magenta
- 21.🌈 Which hex code is yellow? (a) #ff0000 (b) #ffffff (c) #ffff00 (d) #ff00ff
- 22.🌈 In #d10000 the red part is the hex number d1. What is it as a normal number?
- 23.🌈 In #008000 the green part is the hex number 80. What is it as a normal number?
- 24.🌈 Which colour of light is strongest in rgb(180, 38, 109)? (a) green (b) blue (c) red
- 25.🌈 In #7c0000 the red part is the hex number 7c. What is it as a normal number?
- 26.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) green (d) black
- 27.🌈 Which colour of light is strongest in rgb(195, 84, 86)? (a) blue (b) red (c) green
- 28.🌈 In #410000 the red part is the hex number 41. What is it as a normal number?
- 29.🌈 Which colour of light is strongest in rgb(251, 24, 65)? (a) green (b) red (c) blue
- 30.🌈 In #b10000 the red part is the hex number b1. What is it as a normal number?
- 31.🌈 Which colour of light is strongest in rgb(105, 51, 154)? (a) green (b) red (c) blue
- 32.🌈 Which colour is #0000ff? (a) white (b) blue (c) bright green (d) red
- 33.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) black (c) cyan (d) white
- 34.🌈 Which colour is #ff00ff? (a) bright green (b) magenta (c) white (d) yellow
- 35.🌈 Which colour of light is strongest in rgb(138, 208, 124)? (a) blue (b) red (c) green
- 36.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) yellow (c) bright green (d) blue
- 37.🌈 Which hex code is blue? (a) #ff0000 (b) #ffff00 (c) #00ff00 (d) #0000ff
- 38.🌈 In #008500 the green part is the hex number 85. What is it as a normal number?
- 39.🌈 In #008600 the green part is the hex number 86. What is it as a normal number?
- 40.🌈 Which colour of light is strongest in rgb(169, 102, 37)? (a) green (b) red (c) blue
Answer key
- blue
- bright green
- F
- #00ff00
- blue
- red
- #ff0000
- blue
- 26
- magenta
- bright green
- white
- 3
- 71
- #00ffff
- 2
- 255
- blue
- #ffffff
- black
- #ffff00
- 209
- 128
- red
- 124
- red
- red
- 65
- red
- 177
- blue
- blue
- black
- magenta
- green
- yellow
- #0000ff
- 133
- 134
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids