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(0, 0, 0)? (a) blue (b) black (c) magenta (d) yellow
- 2.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) red (c) green (d) white
- 3.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) cyan (c) black (d) magenta
- 4.🌈 Which hex code is magenta? (a) #00ffff (b) #ff00ff (c) #00ff00 (d) #ff0000
- 5.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 99 (d) 255
- 6.🌈 In #008500 the green part is the hex number 85. What is it as a normal number?
- 7.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) cyan (c) red (d) bright green
- 8.🌈 Which colour is #ff00ff? (a) cyan (b) magenta (c) bright green (d) white
- 9.🌈 Which colour is #ff0000? (a) magenta (b) bright green (c) red (d) yellow
- 10.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) black (c) blue (d) green
- 11.🌈 Which hex code is bright green? (a) #0000ff (b) #00ff00 (c) #00ffff (d) #ffff00
- 12.🌈 Which colour is #00ffff? (a) black (b) blue (c) cyan (d) bright green
- 13.🌈 Which colour of light is strongest in rgb(233, 107, 17)? (a) blue (b) red (c) green
- 14.🌈 In #004c00 the green part is the hex number 4c. What is it as a normal number?
- 15.🌈 In #000039 the blue part is the hex number 39. What is it as a normal number?
- 16.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 4 (c) 6 (d) 2
- 17.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) G (d) Z
- 18.🌈 In #009600 the green part is the hex number 96. What is it as a normal number?
- 19.🌈 In #db0000 the red part is the hex number db. What is it as a normal number?
- 20.🌈 Which hex code is yellow? (a) #000000 (b) #ffffff (c) #ff0000 (d) #ffff00
- 21.🌈 Which hex code is cyan? (a) #00ff00 (b) #00ffff (c) #ff0000 (d) #000000
- 22.🌈 In #008000 the green part is the hex number 80. What is it as a normal number?
- 23.🌈 Which hex code is black? (a) #0000ff (b) #ff0000 (c) #ffffff (d) #000000
- 24.🌈 In #0c0000 the red part is the hex number 0c. What is it as a normal number?
- 25.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) white (c) red (d) cyan
- 26.🌈 Which colour of light is strongest in rgb(31, 197, 61)? (a) green (b) red (c) blue
- 27.🌈 In #300000 the red part is the hex number 30. What is it as a normal number?
- 28.🌈 Which colour is #000000? (a) red (b) magenta (c) white (d) black
- 29.🌈 Which colour of light is strongest in rgb(2, 178, 86)? (a) red (b) blue (c) green
- 30.🌈 In #003800 the green part is the hex number 38. What is it as a normal number?
- 31.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) yellow (c) magenta (d) red
- 32.🌈 Which colour of light is strongest in rgb(244, 4, 96)? (a) green (b) red (c) blue
- 33.🌈 Which colour of light is strongest in rgb(159, 67, 102)? (a) green (b) blue (c) red
- 34.🌈 Which colour of light is strongest in rgb(76, 40, 244)? (a) red (b) green (c) blue
- 35.🌈 Which colour of light is strongest in rgb(96, 152, 64)? (a) red (b) blue (c) green
- 36.🌈 In #002600 the green part is the hex number 26. What is it as a normal number?
- 37.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) black (c) blue (d) yellow
- 38.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) blue (c) black (d) bright green
- 39.🌈 Which colour is #00ff00? (a) bright green (b) cyan (c) magenta (d) yellow
- 40.🌈 Which hex code is white? (a) #ff00ff (b) #ffffff (c) #00ffff (d) #00ff00
Answer key
- black
- blue
- blue
- #ff00ff
- 255
- 133
- bright green
- magenta
- red
- red
- #00ff00
- cyan
- red
- 76
- 57
- 3
- F
- 150
- 219
- #ffff00
- #00ffff
- 128
- #000000
- 12
- cyan
- green
- 48
- black
- green
- 56
- magenta
- red
- red
- blue
- green
- 38
- red
- white
- bright green
- #ffffff
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids