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 hex code is red? (a) #ff0000 (b) #000000 (c) #00ffff (d) #0000ff
- 2.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) F (d) Z
- 3.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) blue (d) red
- 4.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) red (c) white (d) cyan
- 5.🌈 Which hex code is cyan? (a) #00ff00 (b) #00ffff (c) #ffffff (d) #ff0000
- 6.🌈 Which colour of light is strongest in rgb(5, 151, 106)? (a) blue (b) red (c) green
- 7.🌈 Which hex code is white? (a) #ff0000 (b) #000000 (c) #00ff00 (d) #ffffff
- 8.🌈 Which colour is #00ffff? (a) red (b) yellow (c) cyan (d) magenta
- 9.🌈 Which colour is #ff0000? (a) yellow (b) magenta (c) red (d) blue
- 10.🌈 Which colour is #00ff00? (a) blue (b) yellow (c) black (d) bright green
- 11.🌈 Which colour of light is strongest in rgb(109, 71, 166)? (a) green (b) red (c) blue
- 12.🌈 Which colour of light is strongest in rgb(208, 125, 13)? (a) red (b) blue (c) green
- 13.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 99 (c) 1000 (d) 100
- 14.🌈 Which colour is #000000? (a) bright green (b) black (c) red (d) blue
- 15.🌈 Which colour is #0000ff? (a) bright green (b) yellow (c) red (d) blue
- 16.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) white (d) blue
- 17.🌈 In #2a0000 the red part is the hex number 2a. What is it as a normal number?
- 18.🌈 Which colour of light is strongest in rgb(232, 118, 115)? (a) green (b) red (c) blue
- 19.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 6 (d) 3
- 20.🌈 Which colour is #ffff00? (a) cyan (b) black (c) magenta (d) yellow
- 21.🌈 Which colour is #ff00ff? (a) white (b) magenta (c) bright green (d) red
- 22.🌈 Which colour of light is strongest in rgb(244, 67, 33)? (a) red (b) green (c) blue
- 23.🌈 Which colour is #ffffff? (a) cyan (b) magenta (c) white (d) red
- 24.🌈 In #a00000 the red part is the hex number a0. What is it as a normal number?
- 25.🌈 In #480000 the red part is the hex number 48. What is it as a normal number?
- 26.🌈 In #060000 the red part is the hex number 06. What is it as a normal number?
- 27.🌈 In #000012 the blue part is the hex number 12. What is it as a normal number?
- 28.🌈 In #000000 the green part is the hex number 00. What is it as a normal number?
- 29.🌈 In #000003 the blue part is the hex number 03. What is it as a normal number?
- 30.🌈 Which hex code is yellow? (a) #000000 (b) #ffffff (c) #ffff00 (d) #ff0000
- 31.🌈 Which hex code is black? (a) #ff00ff (b) #ffffff (c) #000000 (d) #00ffff
- 32.🌈 In #170000 the red part is the hex number 17. What is it as a normal number?
- 33.🌈 Which colour of light is strongest in rgb(31, 69, 181)? (a) red (b) blue (c) green
- 34.🌈 Which colour of light is strongest in rgb(65, 201, 90)? (a) blue (b) red (c) green
- 35.🌈 Which colour of light is strongest in rgb(59, 19, 201)? (a) red (b) blue (c) green
- 36.🌈 Which colour is rgb(0, 0, 255)? (a) cyan (b) bright green (c) white (d) blue
- 37.🌈 In #00003c the blue part is the hex number 3c. What is it as a normal number?
- 38.🌈 Which colour of light is strongest in rgb(21, 185, 59)? (a) green (b) red (c) blue
- 39.🌈 Which colour of light is strongest in rgb(11, 243, 43)? (a) red (b) blue (c) green
- 40.🌈 Which colour of light is strongest in rgb(82, 207, 140)? (a) green (b) red (c) blue
Answer key
- #ff0000
- F
- red
- cyan
- #00ffff
- green
- #ffffff
- cyan
- red
- bright green
- blue
- red
- 255
- black
- blue
- blue
- 42
- red
- 3
- yellow
- magenta
- red
- white
- 160
- 72
- 6
- 18
- 0
- 3
- #ffff00
- #000000
- 23
- blue
- green
- blue
- blue
- 60
- green
- green
- green
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids