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.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) blue (d) white
- 2.🌈 Which colour of light is strongest in rgb(27, 190, 75)? (a) green (b) red (c) blue
- 3.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) red (c) magenta (d) yellow
- 4.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 4 (d) 2
- 5.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) yellow (c) black (d) white
- 6.🌈 Which colour of light is strongest in rgb(169, 103, 75)? (a) blue (b) green (c) red
- 7.🌈 Which hex code is cyan? (a) #00ff00 (b) #000000 (c) #ffffff (d) #00ffff
- 8.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) F (d) J
- 9.🌈 Which colour of light is strongest in rgb(26, 187, 8)? (a) blue (b) red (c) green
- 10.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) red (c) blue (d) yellow
- 11.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) bright green (c) black (d) red
- 12.🌈 In #000096 the blue part is the hex number 96. What is it as a normal number?
- 13.🌈 In #006100 the green part is the hex number 61. What is it as a normal number?
- 14.🌈 Which colour is #000000? (a) cyan (b) black (c) bright green (d) magenta
- 15.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) red (d) green
- 16.🌈 Which colour is #0000ff? (a) cyan (b) bright green (c) blue (d) red
- 17.🌈 Which colour is rgb(0, 0, 255)? (a) cyan (b) blue (c) bright green (d) black
- 18.🌈 Which colour is #ff0000? (a) black (b) cyan (c) white (d) red
- 19.🌈 In #d90000 the red part is the hex number d9. What is it as a normal number?
- 20.🌈 In #c80000 the red part is the hex number c8. What is it as a normal number?
- 21.🌈 Which hex code is white? (a) #ff0000 (b) #0000ff (c) #ffff00 (d) #ffffff
- 22.🌈 Which colour is #ff00ff? (a) black (b) cyan (c) magenta (d) white
- 23.🌈 Which colour of light is strongest in rgb(230, 81, 139)? (a) green (b) red (c) blue
- 24.🌈 Which colour is #00ffff? (a) blue (b) cyan (c) red (d) yellow
- 25.🌈 Which colour of light is strongest in rgb(159, 23, 100)? (a) green (b) red (c) blue
- 26.🌈 In #009300 the green part is the hex number 93. What is it as a normal number?
- 27.🌈 In #0000fd the blue part is the hex number fd. What is it as a normal number?
- 28.🌈 Which colour is #ffffff? (a) red (b) cyan (c) white (d) magenta
- 29.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 255 (d) 99
- 30.🌈 Which colour of light is strongest in rgb(16, 220, 46)? (a) blue (b) red (c) green
- 31.🌈 Which colour of light is strongest in rgb(81, 169, 11)? (a) blue (b) green (c) red
- 32.🌈 In #000045 the blue part is the hex number 45. What is it as a normal number?
- 33.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) bright green (c) white (d) red
- 34.🌈 Which hex code is blue? (a) #00ff00 (b) #0000ff (c) #ffff00 (d) #ffffff
- 35.🌈 In #000054 the blue part is the hex number 54. What is it as a normal number?
- 36.🌈 Which colour of light is strongest in rgb(224, 87, 35)? (a) green (b) blue (c) red
- 37.🌈 In #8b0000 the red part is the hex number 8b. What is it as a normal number?
- 38.🌈 Which hex code is red? (a) #ff0000 (b) #ff00ff (c) #0000ff (d) #00ffff
- 39.🌈 Which colour is #00ff00? (a) yellow (b) bright green (c) magenta (d) red
- 40.🌈 Which colour of light is strongest in rgb(21, 192, 18)? (a) red (b) green (c) blue
Answer key
- blue
- green
- red
- 3
- cyan
- red
- #00ffff
- F
- green
- black
- magenta
- 150
- 97
- black
- red
- blue
- blue
- red
- 217
- 200
- #ffffff
- magenta
- red
- cyan
- red
- 147
- 253
- white
- 255
- green
- green
- 69
- bright green
- #0000ff
- 84
- red
- 139
- #ff0000
- bright green
- green
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids