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 rgb(255, 255, 255)? (a) cyan (b) magenta (c) yellow (d) white
- 2.🌈 Which hex code is yellow? (a) #00ffff (b) #00ff00 (c) #ffff00 (d) #ff0000
- 3.🌈 Which colour of light is strongest in rgb(104, 62, 242)? (a) green (b) red (c) blue
- 4.🌈 Which colour of light is strongest in rgb(60, 186, 90)? (a) red (b) green (c) blue
- 5.🌈 In #008500 the green part is the hex number 85. What is it as a normal number?
- 6.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 6 (c) 4 (d) 2
- 7.🌈 In #a80000 the red part is the hex number a8. What is it as a normal number?
- 8.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) blue (c) cyan (d) black
- 9.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) cyan (c) magenta (d) bright green
- 10.🌈 Which colour of light is strongest in rgb(108, 237, 110)? (a) green (b) blue (c) red
- 11.🌈 Which colour is #0000ff? (a) red (b) blue (c) yellow (d) cyan
- 12.🌈 Which colour of light is strongest in rgb(181, 28, 45)? (a) green (b) red (c) blue
- 13.🌈 In #001600 the green part is the hex number 16. What is it as a normal number?
- 14.🌈 Which colour is #ffff00? (a) black (b) magenta (c) yellow (d) white
- 15.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) blue (d) white
- 16.🌈 Which colour of light is strongest in rgb(187, 108, 14)? (a) blue (b) red (c) green
- 17.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) red (c) cyan (d) bright green
- 18.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 100 (d) 1000
- 19.🌈 In #be0000 the red part is the hex number be. What is it as a normal number?
- 20.🌈 Which hex code is red? (a) #ff0000 (b) #00ff00 (c) #00ffff (d) #ffff00
- 21.🌈 Which colour is #ff0000? (a) red (b) black (c) white (d) blue
- 22.🌈 Which colour is #00ffff? (a) blue (b) black (c) red (d) cyan
- 23.🌈 Which colour is #00ff00? (a) black (b) red (c) blue (d) bright green
- 24.🌈 In #010000 the red part is the hex number 01. What is it as a normal number?
- 25.🌈 Which colour of light is strongest in rgb(233, 55, 23)? (a) red (b) blue (c) green
- 26.🌈 In #640000 the red part is the hex number 64. What is it as a normal number?
- 27.🌈 Which hex code is blue? (a) #ffff00 (b) #ffffff (c) #00ff00 (d) #0000ff
- 28.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) blue (d) green
- 29.🌈 In #0000ab the blue part is the hex number ab. What is it as a normal number?
- 30.🌈 Which colour of light is strongest in rgb(25, 104, 189)? (a) green (b) red (c) blue
- 31.🌈 Which hex code is black? (a) #000000 (b) #ff00ff (c) #ff0000 (d) #ffff00
- 32.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) bright green (c) red (d) cyan
- 33.🌈 Which colour of light is strongest in rgb(2, 217, 134)? (a) red (b) blue (c) green
- 34.🌈 In #007400 the green part is the hex number 74. What is it as a normal number?
- 35.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) yellow (c) bright green (d) red
- 36.🌈 Which colour of light is strongest in rgb(176, 25, 138)? (a) green (b) red (c) blue
- 37.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) blue (c) yellow (d) black
- 38.🌈 In #000062 the blue part is the hex number 62. What is it as a normal number?
- 39.🌈 In #00c400 the green part is the hex number c4. What is it as a normal number?
- 40.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) blue (c) bright green (d) black
Answer key
- white
- #ffff00
- blue
- green
- 133
- 3
- 168
- blue
- magenta
- green
- blue
- red
- 22
- yellow
- blue
- red
- bright green
- 255
- 190
- #ff0000
- red
- cyan
- bright green
- 1
- red
- 100
- #0000ff
- red
- 171
- blue
- #000000
- yellow
- green
- 116
- red
- red
- cyan
- 98
- 196
- black
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids