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 #f10000 the red part is the hex number f1. What is it as a normal number?
- 2.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 3 (d) 6
- 3.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 255 (d) 99
- 4.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) red (d) green
- 5.🌈 Which colour is #ff0000? (a) black (b) white (c) red (d) yellow
- 6.🌈 Which colour is #ffffff? (a) black (b) yellow (c) cyan (d) white
- 7.🌈 In #000011 the blue part is the hex number 11. What is it as a normal number?
- 8.🌈 Which colour is #00ff00? (a) cyan (b) white (c) black (d) bright green
- 9.🌈 Which colour is #0000ff? (a) cyan (b) blue (c) yellow (d) magenta
- 10.🌈 In #000053 the blue part is the hex number 53. What is it as a normal number?
- 11.🌈 In #440000 the red part is the hex number 44. What is it as a normal number?
- 12.🌈 Which hex code is white? (a) #00ff00 (b) #000000 (c) #0000ff (d) #ffffff
- 13.🌈 Which colour of light is strongest in rgb(220, 21, 60)? (a) green (b) red (c) blue
- 14.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) bright green (c) yellow (d) black
- 15.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) magenta (c) red (d) black
- 16.🌈 Which colour is #ff00ff? (a) blue (b) magenta (c) yellow (d) red
- 17.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) black (c) magenta (d) blue
- 18.🌈 Which colour is #ffff00? (a) blue (b) red (c) yellow (d) black
- 19.🌈 Which colour of light is strongest in rgb(154, 123, 137)? (a) green (b) blue (c) red
- 20.🌈 Which colour of light is strongest in rgb(5, 8, 229)? (a) blue (b) green (c) red
- 21.🌈 Which colour of light is strongest in rgb(187, 140, 33)? (a) blue (b) red (c) green
- 22.🌈 In #000048 the blue part is the hex number 48. What is it as a normal number?
- 23.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) F (c) J (d) G
- 24.🌈 In #000013 the blue part is the hex number 13. What is it as a normal number?
- 25.🌈 Which hex code is magenta? (a) #ff00ff (b) #ffffff (c) #ffff00 (d) #00ffff
- 26.🌈 In #0000a4 the blue part is the hex number a4. What is it as a normal number?
- 27.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) blue (c) white (d) bright green
- 28.🌈 Which colour of light is strongest in rgb(181, 39, 53)? (a) red (b) green (c) blue
- 29.🌈 Which colour is #00ffff? (a) cyan (b) yellow (c) blue (d) black
- 30.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) blue (d) red
- 31.🌈 In #0000ac the blue part is the hex number ac. What is it as a normal number?
- 32.🌈 In #770000 the red part is the hex number 77. What is it as a normal number?
- 33.🌈 Which colour is #000000? (a) white (b) cyan (c) magenta (d) black
- 34.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) white (c) blue (d) red
- 35.🌈 Which colour of light is strongest in rgb(80, 232, 112)? (a) green (b) blue (c) red
- 36.🌈 Which hex code is cyan? (a) #0000ff (b) #00ffff (c) #00ff00 (d) #000000
- 37.🌈 In #005b00 the green part is the hex number 5b. What is it as a normal number?
- 38.🌈 Which hex code is yellow? (a) #ff0000 (b) #ffff00 (c) #ffffff (d) #ff00ff
- 39.🌈 Which colour of light is strongest in rgb(233, 121, 87)? (a) blue (b) red (c) green
- 40.🌈 Which colour of light is strongest in rgb(121, 108, 159)? (a) red (b) blue (c) green
Answer key
- 241
- 3
- 255
- red
- red
- white
- 17
- bright green
- blue
- 83
- 68
- #ffffff
- red
- magenta
- black
- magenta
- blue
- yellow
- red
- blue
- red
- 72
- F
- 19
- #ff00ff
- 164
- cyan
- red
- cyan
- blue
- 172
- 119
- black
- yellow
- green
- #00ffff
- 91
- #ffff00
- red
- blue
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids