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, 0, 255)? (a) yellow (b) red (c) blue (d) magenta
- 2.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) red (c) green (d) white
- 3.🌈 In #00e800 the green part is the hex number e8. What is it as a normal number?
- 4.🌈 Which colour of light is strongest in rgb(81, 215, 12)? (a) green (b) red (c) blue
- 5.🌈 In #e20000 the red part is the hex number e2. What is it as a normal number?
- 6.🌈 In #310000 the red part is the hex number 31. What is it as a normal number?
- 7.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 1000 (d) 99
- 8.🌈 Which colour is #ffffff? (a) white (b) yellow (c) black (d) red
- 9.🌈 Which colour of light is strongest in rgb(46, 255, 8)? (a) blue (b) red (c) green
- 10.🌈 Which colour of light is strongest in rgb(33, 32, 165)? (a) green (b) red (c) blue
- 11.🌈 Which hex code is yellow? (a) #00ff00 (b) #ffff00 (c) #0000ff (d) #ffffff
- 12.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) blue (d) green
- 13.🌈 Which colour is #0000ff? (a) white (b) blue (c) bright green (d) magenta
- 14.🌈 In #0000d7 the blue part is the hex number d7. What is it as a normal number?
- 15.🌈 Which hex code is red? (a) #ffff00 (b) #ff0000 (c) #0000ff (d) #ff00ff
- 16.🌈 Which colour of light is strongest in rgb(91, 60, 173)? (a) red (b) green (c) blue
- 17.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) blue (c) bright green (d) white
- 18.🌈 Which colour of light is strongest in rgb(73, 112, 151)? (a) red (b) green (c) blue
- 19.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 3 (d) 2
- 20.🌈 In #009000 the green part is the hex number 90. What is it as a normal number?
- 21.🌈 Which hex code is black? (a) #0000ff (b) #ff00ff (c) #00ff00 (d) #000000
- 22.🌈 In #cb0000 the red part is the hex number cb. What is it as a normal number?
- 23.🌈 Which hex code is cyan? (a) #000000 (b) #ff00ff (c) #00ffff (d) #ffff00
- 24.🌈 Which hex code is magenta? (a) #ffffff (b) #ffff00 (c) #ff00ff (d) #000000
- 25.🌈 In #020000 the red part is the hex number 02. What is it as a normal number?
- 26.🌈 Which colour of light is strongest in rgb(65, 158, 20)? (a) blue (b) red (c) green
- 27.🌈 Which hex code is blue? (a) #ffffff (b) #0000ff (c) #00ffff (d) #ff0000
- 28.🌈 Which colour of light is strongest in rgb(117, 225, 83)? (a) blue (b) green (c) red
- 29.🌈 In #000043 the blue part is the hex number 43. What is it as a normal number?
- 30.🌈 In #180000 the red part is the hex number 18. What is it as a normal number?
- 31.🌈 Which colour is #ffff00? (a) blue (b) bright green (c) yellow (d) cyan
- 32.🌈 Which colour is #ff00ff? (a) white (b) bright green (c) yellow (d) magenta
- 33.🌈 Which colour of light is strongest in rgb(21, 184, 118)? (a) blue (b) red (c) green
- 34.🌈 In #f60000 the red part is the hex number f6. What is it as a normal number?
- 35.🌈 Which colour is #00ffff? (a) bright green (b) blue (c) cyan (d) red
- 36.🌈 In #760000 the red part is the hex number 76. What is it as a normal number?
- 37.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) yellow (c) white (d) blue
- 38.🌈 In #000000 the blue part is the hex number 00. What is it as a normal number?
- 39.🌈 Which colour of light is strongest in rgb(59, 68, 246)? (a) red (b) green (c) blue
- 40.🌈 Which colour is #ff0000? (a) red (b) bright green (c) black (d) magenta
Answer key
- magenta
- blue
- 232
- green
- 226
- 49
- 255
- white
- green
- blue
- #ffff00
- red
- blue
- 215
- #ff0000
- blue
- red
- blue
- 3
- 144
- #000000
- 203
- #00ffff
- #ff00ff
- 2
- green
- #0000ff
- green
- 67
- 24
- yellow
- magenta
- green
- 246
- cyan
- 118
- white
- 0
- blue
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids