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 #ffff00? (a) blue (b) yellow (c) red (d) cyan
- 2.🌈 Which hex code is white? (a) #ff0000 (b) #00ff00 (c) #00ffff (d) #ffffff
- 3.🌈 Which colour is #000000? (a) black (b) magenta (c) cyan (d) yellow
- 4.🌈 In #0e0000 the red part is the hex number 0e. What is it as a normal number?
- 5.🌈 Which colour is #0000ff? (a) white (b) red (c) bright green (d) blue
- 6.🌈 Which colour of light is strongest in rgb(139, 120, 196)? (a) red (b) green (c) blue
- 7.🌈 Which colour of light is strongest in rgb(57, 22, 183)? (a) green (b) blue (c) red
- 8.🌈 Which colour is #ff00ff? (a) magenta (b) yellow (c) bright green (d) black
- 9.🌈 Which colour of light is strongest in rgb(87, 222, 41)? (a) green (b) red (c) blue
- 10.🌈 Which hex code is magenta? (a) #ffff00 (b) #ff0000 (c) #ff00ff (d) #0000ff
- 11.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) yellow (c) white (d) black
- 12.🌈 In #007200 the green part is the hex number 72. What is it as a normal number?
- 13.🌈 In #520000 the red part is the hex number 52. What is it as a normal number?
- 14.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 255 (c) 1000 (d) 99
- 15.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) blue (d) red
- 16.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 4 (d) 6
- 17.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) J (c) Z (d) F
- 18.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) yellow (c) cyan (d) magenta
- 19.🌈 In #080000 the red part is the hex number 08. What is it as a normal number?
- 20.🌈 Which colour is #00ffff? (a) bright green (b) cyan (c) blue (d) red
- 21.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) red (d) green
- 22.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) magenta (c) white (d) red
- 23.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) bright green (c) yellow (d) red
- 24.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) black (c) yellow (d) cyan
- 25.🌈 Which hex code is cyan? (a) #00ff00 (b) #000000 (c) #ff00ff (d) #00ffff
- 26.🌈 Which colour is #00ff00? (a) yellow (b) bright green (c) blue (d) black
- 27.🌈 In #007400 the green part is the hex number 74. What is it as a normal number?
- 28.🌈 Which colour of light is strongest in rgb(6, 119, 155)? (a) red (b) green (c) blue
- 29.🌈 Which colour of light is strongest in rgb(39, 242, 6)? (a) blue (b) green (c) red
- 30.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) bright green (c) blue (d) yellow
- 31.🌈 Which colour of light is strongest in rgb(226, 79, 64)? (a) blue (b) green (c) red
- 32.🌈 Which colour of light is strongest in rgb(138, 80, 191)? (a) green (b) blue (c) red
- 33.🌈 Which hex code is black? (a) #ff00ff (b) #000000 (c) #ff0000 (d) #0000ff
- 34.🌈 In #00000b the blue part is the hex number 0b. What is it as a normal number?
- 35.🌈 Which hex code is red? (a) #00ff00 (b) #ff00ff (c) #0000ff (d) #ff0000
- 36.🌈 Which colour is #ffffff? (a) white (b) blue (c) black (d) magenta
- 37.🌈 Which hex code is blue? (a) #ffffff (b) #00ffff (c) #0000ff (d) #000000
- 38.🌈 In #00b100 the green part is the hex number b1. What is it as a normal number?
- 39.🌈 In #004800 the green part is the hex number 48. What is it as a normal number?
- 40.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) white (c) bright green (d) black
Answer key
- yellow
- #ffffff
- black
- 14
- blue
- blue
- blue
- magenta
- green
- #ff00ff
- white
- 114
- 82
- 255
- blue
- 3
- F
- magenta
- 8
- cyan
- red
- cyan
- black
- yellow
- #00ffff
- bright green
- 116
- blue
- green
- bright green
- red
- blue
- #000000
- 11
- #ff0000
- white
- #0000ff
- 177
- 72
- blue
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids