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) magenta (b) red (c) black (d) blue
- 2.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) yellow (c) blue (d) black
- 3.🌈 Which hex code is red? (a) #0000ff (b) #ff0000 (c) #ffffff (d) #ff00ff
- 4.🌈 Which hex code is white? (a) #ffffff (b) #00ff00 (c) #00ffff (d) #ff0000
- 5.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) bright green (c) magenta (d) yellow
- 6.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 99 (c) 100 (d) 1000
- 7.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) J (c) F (d) Z
- 8.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) blue (d) white
- 9.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) blue (d) red
- 10.🌈 In #003400 the green part is the hex number 34. What is it as a normal number?
- 11.🌈 Which colour of light is strongest in rgb(46, 222, 17)? (a) green (b) blue (c) red
- 12.🌈 Which colour of light is strongest in rgb(54, 186, 69)? (a) blue (b) red (c) green
- 13.🌈 Which hex code is yellow? (a) #ffffff (b) #ffff00 (c) #0000ff (d) #000000
- 14.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 3 (d) 6
- 15.🌈 In #00bb00 the green part is the hex number bb. What is it as a normal number?
- 16.🌈 Which hex code is black? (a) #0000ff (b) #00ff00 (c) #000000 (d) #ff0000
- 17.🌈 In #670000 the red part is the hex number 67. What is it as a normal number?
- 18.🌈 Which colour of light is strongest in rgb(119, 89, 211)? (a) red (b) green (c) blue
- 19.🌈 Which colour is #ffff00? (a) yellow (b) magenta (c) blue (d) white
- 20.🌈 Which hex code is cyan? (a) #00ffff (b) #ff00ff (c) #000000 (d) #ff0000
- 21.🌈 Which colour of light is strongest in rgb(123, 204, 117)? (a) green (b) blue (c) red
- 22.🌈 In #0000d2 the blue part is the hex number d2. What is it as a normal number?
- 23.🌈 In #002e00 the green part is the hex number 2e. What is it as a normal number?
- 24.🌈 In #000050 the blue part is the hex number 50. What is it as a normal number?
- 25.🌈 In #00001c the blue part is the hex number 1c. What is it as a normal number?
- 26.🌈 Which colour is #ff0000? (a) cyan (b) black (c) white (d) red
- 27.🌈 In #3c0000 the red part is the hex number 3c. What is it as a normal number?
- 28.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) magenta (c) black (d) red
- 29.🌈 Which colour is #ffffff? (a) white (b) magenta (c) blue (d) yellow
- 30.🌈 Which colour of light is strongest in rgb(255, 5, 112)? (a) green (b) blue (c) red
- 31.🌈 Which colour of light is strongest in rgb(194, 5, 99)? (a) green (b) red (c) blue
- 32.🌈 Which colour is #0000ff? (a) blue (b) black (c) bright green (d) magenta
- 33.🌈 In #d70000 the red part is the hex number d7. What is it as a normal number?
- 34.🌈 Which colour of light is strongest in rgb(173, 46, 3)? (a) green (b) red (c) blue
- 35.🌈 Which colour of light is strongest in rgb(179, 124, 2)? (a) blue (b) green (c) red
- 36.🌈 In #000065 the blue part is the hex number 65. What is it as a normal number?
- 37.🌈 In #001400 the green part is the hex number 14. What is it as a normal number?
- 38.🌈 In #000054 the blue part is the hex number 54. What is it as a normal number?
- 39.🌈 Which colour of light is strongest in rgb(80, 209, 79)? (a) blue (b) red (c) green
- 40.🌈 Which colour of light is strongest in rgb(55, 83, 209)? (a) green (b) red (c) blue
Answer key
- black
- blue
- #ff0000
- #ffffff
- red
- 255
- F
- blue
- red
- 52
- green
- green
- #ffff00
- 3
- 187
- #000000
- 103
- blue
- yellow
- #00ffff
- green
- 210
- 46
- 80
- 28
- red
- 60
- black
- white
- red
- red
- blue
- 215
- red
- red
- 101
- 20
- 84
- green
- blue
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids