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 #0e0000 the red part is the hex number 0e. What is it as a normal number?
- 2.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) yellow (c) white (d) blue
- 3.🌈 Which colour of light is strongest in rgb(238, 34, 98)? (a) green (b) red (c) blue
- 4.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) bright green (c) yellow (d) black
- 5.🌈 Which colour is #ff00ff? (a) magenta (b) black (c) blue (d) cyan
- 6.🌈 Which colour is rgb(255, 0, 255)? (a) cyan (b) blue (c) magenta (d) black
- 7.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) blue (c) black (d) yellow
- 8.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) blue (d) green
- 9.🌈 Which hex code is blue? (a) #ffffff (b) #00ff00 (c) #0000ff (d) #ff00ff
- 10.🌈 Which colour of light is strongest in rgb(232, 105, 111)? (a) blue (b) red (c) green
- 11.🌈 Which hex code is red? (a) #ff0000 (b) #ffffff (c) #000000 (d) #0000ff
- 12.🌈 Which colour of light is strongest in rgb(151, 55, 123)? (a) green (b) red (c) blue
- 13.🌈 Which colour of light is strongest in rgb(189, 140, 28)? (a) green (b) red (c) blue
- 14.🌈 Which colour of light is strongest in rgb(42, 180, 123)? (a) red (b) blue (c) green
- 15.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) bright green (c) cyan (d) white
- 16.🌈 Which hex code is magenta? (a) #ffffff (b) #00ffff (c) #ffff00 (d) #ff00ff
- 17.🌈 In #160000 the red part is the hex number 16. What is it as a normal number?
- 18.🌈 Which colour of light is strongest in rgb(11, 137, 172)? (a) red (b) green (c) blue
- 19.🌈 Which hex code is bright green? (a) #00ffff (b) #ff00ff (c) #00ff00 (d) #0000ff
- 20.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) red (d) green
- 21.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 99 (d) 255
- 22.🌈 In #700000 the red part is the hex number 70. What is it as a normal number?
- 23.🌈 Which colour is #ff0000? (a) blue (b) cyan (c) magenta (d) red
- 24.🌈 Which colour is #000000? (a) magenta (b) black (c) white (d) bright green
- 25.🌈 In #e70000 the red part is the hex number e7. What is it as a normal number?
- 26.🌈 In #005c00 the green part is the hex number 5c. What is it as a normal number?
- 27.🌈 In #2c0000 the red part is the hex number 2c. What is it as a normal number?
- 28.🌈 Which colour is rgb(255, 255, 255)? (a) bright green (b) cyan (c) red (d) white
- 29.🌈 Which colour of light is strongest in rgb(84, 29, 152)? (a) green (b) blue (c) red
- 30.🌈 Which colour of light is strongest in rgb(97, 154, 119)? (a) green (b) blue (c) red
- 31.🌈 Which colour is #0000ff? (a) red (b) blue (c) magenta (d) yellow
- 32.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) Z (c) G (d) J
- 33.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) magenta (c) yellow (d) black
- 34.🌈 In #970000 the red part is the hex number 97. What is it as a normal number?
- 35.🌈 In #400000 the red part is the hex number 40. What is it as a normal number?
- 36.🌈 In #8b0000 the red part is the hex number 8b. What is it as a normal number?
- 37.🌈 Which hex code is black? (a) #ffffff (b) #000000 (c) #ff00ff (d) #00ffff
- 38.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 4 (d) 6
- 39.🌈 In #ce0000 the red part is the hex number ce. What is it as a normal number?
- 40.🌈 Which colour of light is strongest in rgb(40, 174, 106)? (a) blue (b) green (c) red
Answer key
- 14
- blue
- red
- cyan
- magenta
- magenta
- black
- blue
- #0000ff
- red
- #ff0000
- red
- red
- green
- bright green
- #ff00ff
- 22
- blue
- #00ff00
- red
- 255
- 112
- red
- black
- 231
- 92
- 44
- white
- blue
- green
- blue
- F
- yellow
- 151
- 64
- 139
- #000000
- 3
- 206
- green
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids