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 of light is strongest in rgb(200, 85, 118)? (a) green (b) blue (c) red
- 2.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
- 3.🌈 Which colour of light is strongest in rgb(133, 244, 7)? (a) green (b) blue (c) red
- 4.🌈 Which colour of light is strongest in rgb(62, 46, 152)? (a) blue (b) red (c) green
- 5.🌈 In #005f00 the green part is the hex number 5f. What is it as a normal number?
- 6.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) white (c) green (d) blue
- 7.🌈 Which hex code is yellow? (a) #0000ff (b) #ff00ff (c) #ff0000 (d) #ffff00
- 8.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) bright green (c) white (d) blue
- 9.🌈 In #007300 the green part is the hex number 73. What is it as a normal number?
- 10.🌈 Which colour is #ffff00? (a) black (b) red (c) yellow (d) blue
- 11.🌈 Which hex code is black? (a) #00ff00 (b) #00ffff (c) #ffff00 (d) #000000
- 12.🌈 In #0000be the blue part is the hex number be. What is it as a normal number?
- 13.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 1000 (c) 255 (d) 100
- 14.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) white (c) magenta (d) cyan
- 15.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) G (d) Z
- 16.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 4 (d) 2
- 17.🌈 Which hex code is magenta? (a) #ff00ff (b) #000000 (c) #ff0000 (d) #ffff00
- 18.🌈 Which hex code is red? (a) #ff00ff (b) #ffff00 (c) #ff0000 (d) #00ffff
- 19.🌈 Which colour of light is strongest in rgb(116, 25, 247)? (a) blue (b) green (c) red
- 20.🌈 Which colour of light is strongest in rgb(159, 45, 77)? (a) blue (b) green (c) red
- 21.🌈 Which colour is #00ff00? (a) black (b) bright green (c) magenta (d) cyan
- 22.🌈 In #d30000 the red part is the hex number d3. What is it as a normal number?
- 23.🌈 Which colour of light is strongest in rgb(47, 91, 210)? (a) blue (b) green (c) red
- 24.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) red (c) white (d) yellow
- 25.🌈 Which colour is #ffffff? (a) bright green (b) white (c) red (d) blue
- 26.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) black (c) blue (d) bright green
- 27.🌈 Which colour is #ff00ff? (a) magenta (b) black (c) red (d) yellow
- 28.🌈 Which colour of light is strongest in rgb(197, 7, 49)? (a) red (b) blue (c) green
- 29.🌈 Which colour is #ff0000? (a) red (b) white (c) magenta (d) cyan
- 30.🌈 In #0000ea the blue part is the hex number ea. What is it as a normal number?
- 31.🌈 In #180000 the red part is the hex number 18. What is it as a normal number?
- 32.🌈 In #450000 the red part is the hex number 45. What is it as a normal number?
- 33.🌈 Which colour of light is strongest in rgb(106, 243, 136)? (a) blue (b) red (c) green
- 34.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) cyan (c) black (d) blue
- 35.🌈 Which colour of light is strongest in rgb(211, 84, 101)? (a) green (b) red (c) blue
- 36.🌈 In #7e0000 the red part is the hex number 7e. What is it as a normal number?
- 37.🌈 Which colour is #00ffff? (a) magenta (b) bright green (c) cyan (d) red
- 38.🌈 Which colour is #0000ff? (a) yellow (b) red (c) blue (d) white
- 39.🌈 Which hex code is blue? (a) #000000 (b) #ff0000 (c) #ffff00 (d) #0000ff
- 40.🌈 Which colour of light is strongest in rgb(121, 245, 104)? (a) green (b) blue (c) red
Answer key
- red
- red
- green
- blue
- 95
- blue
- #ffff00
- bright green
- 115
- yellow
- #000000
- 190
- 255
- cyan
- F
- 3
- #ff00ff
- #ff0000
- blue
- red
- bright green
- 211
- blue
- red
- white
- magenta
- magenta
- red
- red
- 234
- 24
- 69
- green
- blue
- red
- 126
- cyan
- blue
- #0000ff
- green
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids