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 #rrggbb, which colour do the last two digits give? (a) white (b) green (c) blue (d) red
- 2.🌈 Which hex code is red? (a) #0000ff (b) #00ffff (c) #ff0000 (d) #ff00ff
- 3.🌈 Which colour of light is strongest in rgb(178, 74, 105)? (a) blue (b) green (c) red
- 4.🌈 Which colour of light is strongest in rgb(135, 131, 160)? (a) blue (b) green (c) red
- 5.🌈 In #000900 the green part is the hex number 09. What is it as a normal number?
- 6.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) blue (d) red
- 7.🌈 Which colour is rgb(255, 0, 0)? (a) magenta (b) red (c) yellow (d) bright green
- 8.🌈 In #000071 the blue part is the hex number 71. What is it as a normal number?
- 9.🌈 In #0000a6 the blue part is the hex number a6. What is it as a normal number?
- 10.🌈 Which hex code is bright green? (a) #00ff00 (b) #ff0000 (c) #00ffff (d) #ffff00
- 11.🌈 Which colour is rgb(0, 0, 255)? (a) white (b) yellow (c) red (d) blue
- 12.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) Z (d) J
- 13.🌈 In #ca0000 the red part is the hex number ca. What is it as a normal number?
- 14.🌈 Which colour is #00ffff? (a) magenta (b) cyan (c) yellow (d) red
- 15.🌈 Which colour is #0000ff? (a) blue (b) cyan (c) black (d) yellow
- 16.🌈 Which hex code is white? (a) #0000ff (b) #00ff00 (c) #ffffff (d) #ff0000
- 17.🌈 Which colour of light is strongest in rgb(62, 181, 16)? (a) green (b) red (c) blue
- 18.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) red (c) yellow (d) blue
- 19.🌈 Which colour of light is strongest in rgb(10, 15, 176)? (a) green (b) red (c) blue
- 20.🌈 Which colour of light is strongest in rgb(120, 163, 134)? (a) blue (b) red (c) green
- 21.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 255 (d) 1000
- 22.🌈 Which colour is #ffffff? (a) blue (b) magenta (c) black (d) white
- 23.🌈 Which colour is #ff0000? (a) magenta (b) blue (c) cyan (d) red
- 24.🌈 In #0000de the blue part is the hex number de. What is it as a normal number?
- 25.🌈 Which hex code is magenta? (a) #00ffff (b) #ffff00 (c) #ff00ff (d) #00ff00
- 26.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) black (c) magenta (d) cyan
- 27.🌈 Which colour of light is strongest in rgb(90, 116, 174)? (a) green (b) red (c) blue
- 28.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) cyan (c) red (d) white
- 29.🌈 In #ce0000 the red part is the hex number ce. What is it as a normal number?
- 30.🌈 In #0000a8 the blue part is the hex number a8. What is it as a normal number?
- 31.🌈 Which colour of light is strongest in rgb(99, 32, 232)? (a) green (b) red (c) blue
- 32.🌈 In #7b0000 the red part is the hex number 7b. What is it as a normal number?
- 33.🌈 Which colour of light is strongest in rgb(243, 84, 75)? (a) green (b) red (c) blue
- 34.🌈 In #00e300 the green part is the hex number e3. What is it as a normal number?
- 35.🌈 Which colour is #00ff00? (a) blue (b) black (c) bright green (d) magenta
- 36.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) magenta (c) red (d) white
- 37.🌈 In #000078 the blue part is the hex number 78. What is it as a normal number?
- 38.🌈 Which hex code is yellow? (a) #0000ff (b) #ffffff (c) #ffff00 (d) #00ffff
- 39.🌈 Which colour is #000000? (a) black (b) cyan (c) yellow (d) magenta
- 40.🌈 Which colour of light is strongest in rgb(162, 65, 49)? (a) green (b) red (c) blue
Answer key
- blue
- #ff0000
- red
- blue
- 9
- red
- red
- 113
- 166
- #00ff00
- blue
- F
- 202
- cyan
- blue
- #ffffff
- green
- yellow
- blue
- green
- 255
- white
- red
- 222
- #ff00ff
- black
- blue
- white
- 206
- 168
- blue
- 123
- red
- 227
- bright green
- magenta
- 120
- #ffff00
- black
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids