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 #006100 the green part is the hex number 61. What is it as a normal number?
- 2.🌈 Which hex code is blue? (a) #ffff00 (b) #ff0000 (c) #0000ff (d) #00ff00
- 3.🌈 Which colour is #0000ff? (a) bright green (b) white (c) black (d) blue
- 4.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 255 (d) 99
- 5.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) bright green (c) white (d) red
- 6.🌈 Which colour of light is strongest in rgb(65, 32, 211)? (a) green (b) red (c) blue
- 7.🌈 Which colour is #000000? (a) black (b) white (c) red (d) cyan
- 8.🌈 Which colour is #00ff00? (a) bright green (b) yellow (c) red (d) blue
- 9.🌈 Which hex code is black? (a) #00ffff (b) #00ff00 (c) #000000 (d) #ff0000
- 10.🌈 Which colour is #00ffff? (a) magenta (b) white (c) cyan (d) black
- 11.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) blue (d) white
- 12.🌈 Which hex code is white? (a) #00ffff (b) #000000 (c) #ffffff (d) #ffff00
- 13.🌈 In #100000 the red part is the hex number 10. What is it as a normal number?
- 14.🌈 Which hex code is magenta? (a) #0000ff (b) #ff0000 (c) #ffffff (d) #ff00ff
- 15.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) black (c) cyan (d) blue
- 16.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) F (c) J (d) G
- 17.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 4 (c) 6 (d) 2
- 18.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) cyan (c) white (d) red
- 19.🌈 In #000006 the blue part is the hex number 06. What is it as a normal number?
- 20.🌈 Which colour of light is strongest in rgb(18, 162, 139)? (a) green (b) blue (c) red
- 21.🌈 In #0000fe the blue part is the hex number fe. What is it as a normal number?
- 22.🌈 Which colour of light is strongest in rgb(237, 121, 80)? (a) red (b) green (c) blue
- 23.🌈 In #f00000 the red part is the hex number f0. What is it as a normal number?
- 24.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) white (c) blue (d) magenta
- 25.🌈 In #260000 the red part is the hex number 26. What is it as a normal number?
- 26.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) blue (d) red
- 27.🌈 Which colour of light is strongest in rgb(248, 97, 78)? (a) blue (b) red (c) green
- 28.🌈 Which hex code is red? (a) #0000ff (b) #ff00ff (c) #ff0000 (d) #00ff00
- 29.🌈 Which colour is #ff0000? (a) white (b) red (c) yellow (d) black
- 30.🌈 Which colour is rgb(0, 255, 0)? (a) magenta (b) red (c) black (d) bright green
- 31.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) red (c) yellow (d) bright green
- 32.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) yellow (c) red (d) white
- 33.🌈 Which colour of light is strongest in rgb(90, 98, 162)? (a) red (b) green (c) blue
- 34.🌈 Which colour of light is strongest in rgb(13, 246, 51)? (a) red (b) green (c) blue
- 35.🌈 In #0000f0 the blue part is the hex number f0. What is it as a normal number?
- 36.🌈 Which colour is #ffffff? (a) red (b) bright green (c) white (d) magenta
- 37.🌈 In #e10000 the red part is the hex number e1. What is it as a normal number?
- 38.🌈 In #290000 the red part is the hex number 29. What is it as a normal number?
- 39.🌈 Which hex code is bright green? (a) #ffff00 (b) #ff00ff (c) #00ff00 (d) #0000ff
- 40.🌈 Which colour is rgb(0, 0, 255)? (a) white (b) magenta (c) cyan (d) blue
Answer key
- 97
- #0000ff
- blue
- 255
- red
- blue
- black
- bright green
- #000000
- cyan
- blue
- #ffffff
- 16
- #ff00ff
- cyan
- F
- 3
- black
- 6
- green
- 254
- red
- 240
- magenta
- 38
- red
- red
- #ff0000
- red
- bright green
- yellow
- white
- blue
- green
- 240
- white
- 225
- 41
- #00ff00
- blue
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids