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 #000000? (a) black (b) yellow (c) white (d) red
- 2.🌈 Which colour of light is strongest in rgb(216, 12, 110)? (a) green (b) blue (c) red
- 3.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) cyan (c) white (d) yellow
- 4.🌈 Which hex code is black? (a) #000000 (b) #ff00ff (c) #00ffff (d) #ff0000
- 5.🌈 In #250000 the red part is the hex number 25. What is it as a normal number?
- 6.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) blue (c) magenta (d) red
- 7.🌈 In #010000 the red part is the hex number 01. What is it as a normal number?
- 8.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) Z (c) J (d) G
- 9.🌈 Which colour of light is strongest in rgb(1, 230, 132)? (a) red (b) green (c) blue
- 10.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) yellow (c) cyan (d) white
- 11.🌈 In #bf0000 the red part is the hex number bf. What is it as a normal number?
- 12.🌈 Which hex code is white? (a) #00ff00 (b) #0000ff (c) #ffffff (d) #000000
- 13.🌈 In #007f00 the green part is the hex number 7f. What is it as a normal number?
- 14.🌈 Which colour of light is strongest in rgb(87, 113, 192)? (a) green (b) red (c) blue
- 15.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 6 (d) 3
- 16.🌈 Which hex code is bright green? (a) #00ff00 (b) #ff0000 (c) #00ffff (d) #ff00ff
- 17.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) bright green (c) black (d) yellow
- 18.🌈 Which colour of light is strongest in rgb(150, 117, 112)? (a) green (b) blue (c) red
- 19.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) green (d) blue
- 20.🌈 Which colour is #00ffff? (a) cyan (b) magenta (c) blue (d) white
- 21.🌈 In #000091 the blue part is the hex number 91. What is it as a normal number?
- 22.🌈 Which colour is #00ff00? (a) bright green (b) white (c) magenta (d) red
- 23.🌈 In #007700 the green part is the hex number 77. What is it as a normal number?
- 24.🌈 Which colour is #ffff00? (a) yellow (b) black (c) red (d) white
- 25.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) black (c) red (d) blue
- 26.🌈 Which colour is #ffffff? (a) red (b) white (c) blue (d) black
- 27.🌈 Which colour of light is strongest in rgb(169, 17, 126)? (a) green (b) blue (c) red
- 28.🌈 Which colour of light is strongest in rgb(99, 20, 252)? (a) blue (b) green (c) red
- 29.🌈 Which colour of light is strongest in rgb(162, 37, 39)? (a) green (b) blue (c) red
- 30.🌈 In #00003c the blue part is the hex number 3c. What is it as a normal number?
- 31.🌈 Which colour of light is strongest in rgb(232, 72, 84)? (a) blue (b) red (c) green
- 32.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 255 (d) 1000
- 33.🌈 Which colour of light is strongest in rgb(8, 31, 150)? (a) blue (b) red (c) green
- 34.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) cyan (c) red (d) bright green
- 35.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) black (c) white (d) cyan
- 36.🌈 In #c80000 the red part is the hex number c8. What is it as a normal number?
- 37.🌈 In #0000c4 the blue part is the hex number c4. What is it as a normal number?
- 38.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) blue (d) red
- 39.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) white (c) red (d) magenta
- 40.🌈 Which hex code is blue? (a) #00ff00 (b) #ffffff (c) #000000 (d) #0000ff
Answer key
- black
- red
- cyan
- #000000
- 37
- yellow
- 1
- F
- green
- bright green
- 191
- #ffffff
- 127
- blue
- 3
- #00ff00
- blue
- red
- red
- cyan
- 145
- bright green
- 119
- yellow
- black
- white
- red
- blue
- red
- 60
- red
- 255
- blue
- red
- white
- 200
- 196
- blue
- magenta
- #0000ff
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids