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) blue (b) white (c) red (d) green
- 2.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) G (d) F
- 3.🌈 Which colour of light is strongest in rgb(39, 115, 200)? (a) green (b) red (c) blue
- 4.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 3 (d) 2
- 5.🌈 Which colour is #0000ff? (a) black (b) blue (c) magenta (d) red
- 6.🌈 Which colour of light is strongest in rgb(159, 114, 119)? (a) red (b) green (c) blue
- 7.🌈 Which colour is #00ff00? (a) black (b) bright green (c) yellow (d) blue
- 8.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) yellow (c) magenta (d) bright green
- 9.🌈 Which colour is #ff00ff? (a) blue (b) bright green (c) magenta (d) yellow
- 10.🌈 Which hex code is black? (a) #00ff00 (b) #000000 (c) #ffff00 (d) #00ffff
- 11.🌈 Which colour of light is strongest in rgb(235, 31, 139)? (a) green (b) red (c) blue
- 12.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) black (c) yellow (d) white
- 13.🌈 Which colour of light is strongest in rgb(21, 218, 98)? (a) red (b) blue (c) green
- 14.🌈 Which colour of light is strongest in rgb(208, 114, 24)? (a) blue (b) green (c) red
- 15.🌈 Which colour is rgb(255, 0, 255)? (a) cyan (b) magenta (c) bright green (d) black
- 16.🌈 Which hex code is blue? (a) #ffff00 (b) #ff00ff (c) #0000ff (d) #ff0000
- 17.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) red (c) bright green (d) yellow
- 18.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) red (d) black
- 19.🌈 In #008f00 the green part is the hex number 8f. What is it as a normal number?
- 20.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 255 (d) 1000
- 21.🌈 Which colour of light is strongest in rgb(45, 44, 200)? (a) blue (b) green (c) red
- 22.🌈 In #000083 the blue part is the hex number 83. What is it as a normal number?
- 23.🌈 Which colour of light is strongest in rgb(64, 113, 225)? (a) red (b) blue (c) green
- 24.🌈 Which hex code is cyan? (a) #ffff00 (b) #00ffff (c) #ff00ff (d) #ff0000
- 25.🌈 Which colour of light is strongest in rgb(109, 168, 10)? (a) blue (b) green (c) red
- 26.🌈 In #710000 the red part is the hex number 71. What is it as a normal number?
- 27.🌈 Which colour is #ff0000? (a) black (b) white (c) magenta (d) red
- 28.🌈 Which colour is #ffff00? (a) red (b) yellow (c) magenta (d) bright green
- 29.🌈 In #009300 the green part is the hex number 93. What is it as a normal number?
- 30.🌈 Which colour of light is strongest in rgb(9, 112, 161)? (a) green (b) red (c) blue
- 31.🌈 Which colour is rgb(255, 0, 0)? (a) magenta (b) red (c) black (d) cyan
- 32.🌈 Which colour is rgb(0, 255, 255)? (a) red (b) bright green (c) cyan (d) blue
- 33.🌈 Which colour of light is strongest in rgb(180, 85, 55)? (a) red (b) blue (c) green
- 34.🌈 Which hex code is red? (a) #ffffff (b) #00ff00 (c) #ffff00 (d) #ff0000
- 35.🌈 In #000074 the blue part is the hex number 74. What is it as a normal number?
- 36.🌈 In #de0000 the red part is the hex number de. What is it as a normal number?
- 37.🌈 Which colour of light is strongest in rgb(127, 108, 172)? (a) red (b) green (c) blue
- 38.🌈 Which colour is rgb(0, 0, 0)? (a) magenta (b) red (c) bright green (d) black
- 39.🌈 Which colour of light is strongest in rgb(180, 19, 70)? (a) blue (b) green (c) red
- 40.🌈 Which hex code is bright green? (a) #ffff00 (b) #00ffff (c) #0000ff (d) #00ff00
Answer key
- blue
- F
- blue
- 3
- blue
- red
- bright green
- bright green
- magenta
- #000000
- red
- yellow
- green
- red
- magenta
- #0000ff
- blue
- red
- 143
- 255
- blue
- 131
- blue
- #00ffff
- green
- 113
- red
- yellow
- 147
- blue
- red
- cyan
- red
- #ff0000
- 116
- 222
- blue
- black
- red
- #00ff00
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids