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 #ffffff? (a) blue (b) black (c) white (d) red
- 2.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 255 (d) 99
- 3.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) blue (c) cyan (d) yellow
- 4.🌈 Which hex code is red? (a) #ff0000 (b) #ffff00 (c) #00ff00 (d) #000000
- 5.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) red (c) white (d) cyan
- 6.🌈 In #000009 the blue part is the hex number 09. What is it as a normal number?
- 7.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 2 (d) 3
- 8.🌈 Which colour is #ff00ff? (a) yellow (b) black (c) magenta (d) blue
- 9.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) F (c) G (d) J
- 10.🌈 In #000035 the blue part is the hex number 35. What is it as a normal number?
- 11.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) yellow (c) bright green (d) blue
- 12.🌈 Which colour is #00ffff? (a) black (b) yellow (c) red (d) cyan
- 13.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) green (d) red
- 14.🌈 Which hex code is white? (a) #ff0000 (b) #000000 (c) #0000ff (d) #ffffff
- 15.🌈 In #0000c3 the blue part is the hex number c3. What is it as a normal number?
- 16.🌈 Which hex code is bright green? (a) #ffffff (b) #00ff00 (c) #0000ff (d) #ffff00
- 17.🌈 Which colour is #000000? (a) blue (b) white (c) yellow (d) black
- 18.🌈 Which colour is rgb(255, 0, 0)? (a) white (b) yellow (c) black (d) red
- 19.🌈 Which hex code is black? (a) #ff0000 (b) #000000 (c) #ffffff (d) #00ffff
- 20.🌈 In #001800 the green part is the hex number 18. What is it as a normal number?
- 21.🌈 In #008300 the green part is the hex number 83. What is it as a normal number?
- 22.🌈 In #e10000 the red part is the hex number e1. What is it as a normal number?
- 23.🌈 Which hex code is cyan? (a) #0000ff (b) #ffff00 (c) #ffffff (d) #00ffff
- 24.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) blue (c) bright green (d) black
- 25.🌈 Which hex code is magenta? (a) #0000ff (b) #ffff00 (c) #ff00ff (d) #ffffff
- 26.🌈 In #00e700 the green part is the hex number e7. What is it as a normal number?
- 27.🌈 In #000020 the blue part is the hex number 20. What is it as a normal number?
- 28.🌈 In #000061 the blue part is the hex number 61. What is it as a normal number?
- 29.🌈 Which colour of light is strongest in rgb(137, 29, 158)? (a) green (b) red (c) blue
- 30.🌈 Which colour is #00ff00? (a) yellow (b) bright green (c) red (d) magenta
- 31.🌈 Which colour of light is strongest in rgb(128, 73, 197)? (a) blue (b) green (c) red
- 32.🌈 Which colour is rgb(255, 255, 0)? (a) cyan (b) blue (c) magenta (d) yellow
- 33.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) white (c) cyan (d) blue
- 34.🌈 Which colour is #0000ff? (a) cyan (b) bright green (c) yellow (d) blue
- 35.🌈 Which colour is #ffff00? (a) red (b) magenta (c) yellow (d) cyan
- 36.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) blue (c) black (d) bright green
- 37.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) red (d) blue
- 38.🌈 Which colour of light is strongest in rgb(166, 131, 107)? (a) red (b) green (c) blue
- 39.🌈 In #002300 the green part is the hex number 23. What is it as a normal number?
- 40.🌈 Which colour of light is strongest in rgb(91, 249, 23)? (a) blue (b) red (c) green
Answer key
- white
- 255
- cyan
- #ff0000
- white
- 9
- 3
- magenta
- F
- 53
- magenta
- cyan
- red
- #ffffff
- 195
- #00ff00
- black
- red
- #000000
- 24
- 131
- 225
- #00ffff
- blue
- #ff00ff
- 231
- 32
- 97
- blue
- bright green
- blue
- yellow
- black
- blue
- yellow
- bright green
- blue
- red
- 35
- green
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids