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, 255, 0)? (a) yellow (b) bright green (c) blue (d) black
- 2.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) bright green (c) magenta (d) black
- 3.🌈 Which colour of light is strongest in rgb(213, 90, 59)? (a) red (b) blue (c) green
- 4.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 2 (d) 4
- 5.🌈 Which hex code is black? (a) #00ffff (b) #ff00ff (c) #000000 (d) #0000ff
- 6.🌈 In #290000 the red part is the hex number 29. What is it as a normal number?
- 7.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) black (c) blue (d) white
- 8.🌈 In #003400 the green part is the hex number 34. What is it as a normal number?
- 9.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) F (d) G
- 10.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 1000 (d) 255
- 11.🌈 In #00006d the blue part is the hex number 6d. What is it as a normal number?
- 12.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) red (d) blue
- 13.🌈 In #009e00 the green part is the hex number 9e. What is it as a normal number?
- 14.🌈 In #00009f the blue part is the hex number 9f. What is it as a normal number?
- 15.🌈 Which hex code is cyan? (a) #00ffff (b) #ffff00 (c) #00ff00 (d) #ff0000
- 16.🌈 Which colour is rgb(255, 0, 0)? (a) white (b) black (c) red (d) bright green
- 17.🌈 Which colour is #00ff00? (a) bright green (b) yellow (c) magenta (d) black
- 18.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) red (d) black
- 19.🌈 Which colour is #0000ff? (a) black (b) blue (c) magenta (d) cyan
- 20.🌈 Which colour of light is strongest in rgb(122, 49, 154)? (a) blue (b) green (c) red
- 21.🌈 Which colour of light is strongest in rgb(168, 105, 114)? (a) red (b) green (c) blue
- 22.🌈 In #005800 the green part is the hex number 58. What is it as a normal number?
- 23.🌈 Which colour is #ff00ff? (a) black (b) bright green (c) blue (d) magenta
- 24.🌈 In #d00000 the red part is the hex number d0. What is it as a normal number?
- 25.🌈 Which colour of light is strongest in rgb(217, 132, 40)? (a) blue (b) green (c) red
- 26.🌈 Which colour of light is strongest in rgb(33, 5, 177)? (a) green (b) blue (c) red
- 27.🌈 In #000089 the blue part is the hex number 89. What is it as a normal number?
- 28.🌈 In #430000 the red part is the hex number 43. What is it as a normal number?
- 29.🌈 Which colour of light is strongest in rgb(85, 170, 133)? (a) blue (b) red (c) green
- 30.🌈 Which hex code is yellow? (a) #ff00ff (b) #000000 (c) #ff0000 (d) #ffff00
- 31.🌈 Which colour of light is strongest in rgb(1, 168, 78)? (a) green (b) red (c) blue
- 32.🌈 In #002000 the green part is the hex number 20. What is it as a normal number?
- 33.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) black (c) yellow (d) cyan
- 34.🌈 Which colour is #ffff00? (a) blue (b) white (c) yellow (d) magenta
- 35.🌈 Which hex code is bright green? (a) #00ffff (b) #00ff00 (c) #ff00ff (d) #000000
- 36.🌈 Which hex code is white? (a) #ff00ff (b) #000000 (c) #ffff00 (d) #ffffff
- 37.🌈 Which colour is #ff0000? (a) magenta (b) yellow (c) red (d) cyan
- 38.🌈 In #000100 the green part is the hex number 01. What is it as a normal number?
- 39.🌈 Which colour of light is strongest in rgb(95, 28, 183)? (a) red (b) blue (c) green
- 40.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) bright green (c) magenta (d) yellow
Answer key
- bright green
- black
- red
- 3
- #000000
- 41
- white
- 52
- F
- 255
- 109
- blue
- 158
- 159
- #00ffff
- red
- bright green
- red
- blue
- blue
- red
- 88
- magenta
- 208
- red
- blue
- 137
- 67
- green
- #ffff00
- green
- 32
- blue
- yellow
- #00ff00
- #ffffff
- red
- 1
- blue
- yellow
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids