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 of light is strongest in rgb(109, 254, 135)? (a) red (b) blue (c) green
- 2.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) cyan (c) black (d) blue
- 3.🌈 In #000089 the blue part is the hex number 89. What is it as a normal number?
- 4.🌈 Which colour is #00ffff? (a) white (b) cyan (c) black (d) blue
- 5.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) blue (c) red (d) white
- 6.🌈 In #000200 the green part is the hex number 02. What is it as a normal number?
- 7.🌈 Which colour of light is strongest in rgb(175, 133, 11)? (a) green (b) blue (c) red
- 8.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) white (c) green (d) red
- 9.🌈 Which colour of light is strongest in rgb(57, 183, 53)? (a) blue (b) green (c) red
- 10.🌈 Which colour is #ff00ff? (a) magenta (b) red (c) bright green (d) cyan
- 11.🌈 In #710000 the red part is the hex number 71. What is it as a normal number?
- 12.🌈 In #ce0000 the red part is the hex number ce. What is it as a normal number?
- 13.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) green (c) black (d) blue
- 14.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 255 (d) 99
- 15.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) yellow (c) white (d) cyan
- 16.🌈 In #000000 the blue part is the hex number 00. What is it as a normal number?
- 17.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 4 (d) 2
- 18.🌈 Which hex code is yellow? (a) #0000ff (b) #00ffff (c) #00ff00 (d) #ffff00
- 19.🌈 Which hex code is red? (a) #00ffff (b) #ff00ff (c) #ff0000 (d) #000000
- 20.🌈 Which colour of light is strongest in rgb(132, 188, 101)? (a) red (b) blue (c) green
- 21.🌈 Which colour is #ffff00? (a) yellow (b) white (c) blue (d) black
- 22.🌈 Which hex code is bright green? (a) #0000ff (b) #ffffff (c) #ff0000 (d) #00ff00
- 23.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) blue (c) cyan (d) magenta
- 24.🌈 In #000078 the blue part is the hex number 78. What is it as a normal number?
- 25.🌈 In #880000 the red part is the hex number 88. What is it as a normal number?
- 26.🌈 Which colour of light is strongest in rgb(247, 84, 32)? (a) red (b) blue (c) green
- 27.🌈 Which colour of light is strongest in rgb(198, 84, 32)? (a) green (b) red (c) blue
- 28.🌈 Which hex code is blue? (a) #0000ff (b) #00ff00 (c) #ffff00 (d) #ffffff
- 29.🌈 Which colour is #0000ff? (a) white (b) black (c) yellow (d) blue
- 30.🌈 In #000021 the blue part is the hex number 21. What is it as a normal number?
- 31.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) J (c) F (d) Z
- 32.🌈 In #510000 the red part is the hex number 51. What is it as a normal number?
- 33.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) magenta (c) bright green (d) white
- 34.🌈 Which colour is #000000? (a) blue (b) black (c) cyan (d) red
- 35.🌈 In #a50000 the red part is the hex number a5. What is it as a normal number?
- 36.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) yellow (c) red (d) blue
- 37.🌈 Which colour is #ff0000? (a) magenta (b) red (c) black (d) cyan
- 38.🌈 In #0000d5 the blue part is the hex number d5. What is it as a normal number?
- 39.🌈 Which colour of light is strongest in rgb(15, 29, 183)? (a) red (b) blue (c) green
- 40.🌈 In #280000 the red part is the hex number 28. What is it as a normal number?
Answer key
- green
- black
- 137
- cyan
- red
- 2
- red
- blue
- green
- magenta
- 113
- 206
- red
- 255
- white
- 0
- 3
- #ffff00
- #ff0000
- green
- yellow
- #00ff00
- cyan
- 120
- 136
- red
- red
- #0000ff
- blue
- 33
- F
- 81
- magenta
- black
- 165
- blue
- red
- 213
- blue
- 40
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids