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) blue (c) green (d) white
- 2.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) black (d) blue
- 3.🌈 Which colour is #00ffff? (a) white (b) red (c) yellow (d) cyan
- 4.🌈 In #002400 the green part is the hex number 24. What is it as a normal number?
- 5.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) Z (d) G
- 6.🌈 Which colour is #00ff00? (a) white (b) bright green (c) yellow (d) blue
- 7.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 2 (d) 4
- 8.🌈 Which colour of light is strongest in rgb(27, 83, 198)? (a) red (b) blue (c) green
- 9.🌈 Which colour is #000000? (a) bright green (b) blue (c) black (d) red
- 10.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) blue (c) bright green (d) black
- 11.🌈 Which hex code is yellow? (a) #ffffff (b) #00ff00 (c) #00ffff (d) #ffff00
- 12.🌈 Which hex code is white? (a) #00ff00 (b) #ff00ff (c) #0000ff (d) #ffffff
- 13.🌈 Which colour is #ff00ff? (a) black (b) white (c) blue (d) magenta
- 14.🌈 Which colour is #0000ff? (a) yellow (b) blue (c) red (d) cyan
- 15.🌈 In #580000 the red part is the hex number 58. What is it as a normal number?
- 16.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) blue (c) red (d) bright green
- 17.🌈 In #4f0000 the red part is the hex number 4f. What is it as a normal number?
- 18.🌈 Which colour is rgb(255, 255, 0)? (a) black (b) yellow (c) blue (d) cyan
- 19.🌈 Which colour of light is strongest in rgb(78, 202, 24)? (a) red (b) blue (c) green
- 20.🌈 Which hex code is blue? (a) #ff0000 (b) #00ff00 (c) #0000ff (d) #ffff00
- 21.🌈 Which colour of light is strongest in rgb(66, 59, 155)? (a) blue (b) green (c) red
- 22.🌈 In #8d0000 the red part is the hex number 8d. What is it as a normal number?
- 23.🌈 In #920000 the red part is the hex number 92. What is it as a normal number?
- 24.🌈 Which colour of light is strongest in rgb(20, 249, 89)? (a) red (b) green (c) blue
- 25.🌈 Which colour of light is strongest in rgb(248, 106, 19)? (a) green (b) blue (c) red
- 26.🌈 In #000001 the blue part is the hex number 01. What is it as a normal number?
- 27.🌈 Which colour of light is strongest in rgb(121, 40, 161)? (a) red (b) blue (c) green
- 28.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 255 (d) 99
- 29.🌈 Which colour of light is strongest in rgb(191, 119, 16)? (a) green (b) red (c) blue
- 30.🌈 Which colour of light is strongest in rgb(166, 117, 27)? (a) blue (b) green (c) red
- 31.🌈 In #810000 the red part is the hex number 81. What is it as a normal number?
- 32.🌈 Which colour is #ffff00? (a) bright green (b) blue (c) white (d) yellow
- 33.🌈 Which colour of light is strongest in rgb(108, 225, 111)? (a) blue (b) green (c) red
- 34.🌈 Which hex code is black? (a) #00ff00 (b) #ff00ff (c) #000000 (d) #ff0000
- 35.🌈 In #c60000 the red part is the hex number c6. What is it as a normal number?
- 36.🌈 Which hex code is bright green? (a) #00ff00 (b) #0000ff (c) #000000 (d) #00ffff
- 37.🌈 In #007300 the green part is the hex number 73. What is it as a normal number?
- 38.🌈 Which colour of light is strongest in rgb(175, 67, 90)? (a) red (b) green (c) blue
- 39.🌈 Which hex code is cyan? (a) #ffff00 (b) #00ff00 (c) #00ffff (d) #000000
- 40.🌈 Which colour of light is strongest in rgb(160, 127, 46)? (a) red (b) blue (c) green
Answer key
- blue
- red
- cyan
- 36
- F
- bright green
- 3
- blue
- black
- red
- #ffff00
- #ffffff
- magenta
- blue
- 88
- blue
- 79
- yellow
- green
- #0000ff
- blue
- 141
- 146
- green
- red
- 1
- blue
- 255
- red
- red
- 129
- yellow
- green
- #000000
- 198
- #00ff00
- 115
- red
- #00ffff
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids