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 hex code is red? (a) #00ff00 (b) #00ffff (c) #ff0000 (d) #000000
- 2.🌈 Which colour of light is strongest in rgb(70, 191, 19)? (a) red (b) green (c) blue
- 3.🌈 Which hex code is blue? (a) #0000ff (b) #00ffff (c) #ffffff (d) #ff00ff
- 4.🌈 Which hex code is cyan? (a) #00ff00 (b) #ff0000 (c) #00ffff (d) #ffffff
- 5.🌈 Which colour of light is strongest in rgb(197, 138, 30)? (a) red (b) green (c) blue
- 6.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) green (d) black
- 7.🌈 In #00fa00 the green part is the hex number fa. What is it as a normal number?
- 8.🌈 In #006d00 the green part is the hex number 6d. What is it as a normal number?
- 9.🌈 Which colour is #00ffff? (a) blue (b) yellow (c) magenta (d) cyan
- 10.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) white (c) green (d) red
- 11.🌈 Which colour is #ff00ff? (a) magenta (b) red (c) blue (d) bright green
- 12.🌈 Which colour is #0000ff? (a) blue (b) cyan (c) white (d) yellow
- 13.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 4 (c) 2 (d) 6
- 14.🌈 Which colour of light is strongest in rgb(229, 61, 2)? (a) green (b) blue (c) red
- 15.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 255 (d) 1000
- 16.🌈 Which colour of light is strongest in rgb(80, 125, 166)? (a) green (b) red (c) blue
- 17.🌈 Which colour is #ff0000? (a) red (b) blue (c) magenta (d) black
- 18.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) Z (c) G (d) J
- 19.🌈 In #007300 the green part is the hex number 73. What is it as a normal number?
- 20.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) yellow (c) blue (d) bright green
- 21.🌈 Which hex code is yellow? (a) #ffffff (b) #ffff00 (c) #0000ff (d) #ff00ff
- 22.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) bright green (c) black (d) red
- 23.🌈 Which hex code is black? (a) #0000ff (b) #00ffff (c) #ff00ff (d) #000000
- 24.🌈 Which colour is #ffffff? (a) white (b) red (c) bright green (d) blue
- 25.🌈 Which colour of light is strongest in rgb(76, 184, 19)? (a) green (b) blue (c) red
- 26.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) cyan (c) black (d) yellow
- 27.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) bright green (c) black (d) magenta
- 28.🌈 Which colour of light is strongest in rgb(102, 208, 88)? (a) green (b) blue (c) red
- 29.🌈 In #440000 the red part is the hex number 44. What is it as a normal number?
- 30.🌈 Which hex code is magenta? (a) #ffffff (b) #00ffff (c) #000000 (d) #ff00ff
- 31.🌈 Which colour of light is strongest in rgb(235, 101, 37)? (a) blue (b) red (c) green
- 32.🌈 Which colour of light is strongest in rgb(248, 33, 14)? (a) blue (b) green (c) red
- 33.🌈 In #00006b the blue part is the hex number 6b. What is it as a normal number?
- 34.🌈 In #00bf00 the green part is the hex number bf. What is it as a normal number?
- 35.🌈 Which colour is #ffff00? (a) white (b) magenta (c) cyan (d) yellow
- 36.🌈 In #008800 the green part is the hex number 88. What is it as a normal number?
- 37.🌈 In #ea0000 the red part is the hex number ea. What is it as a normal number?
- 38.🌈 Which hex code is white? (a) #00ffff (b) #00ff00 (c) #ffffff (d) #ff0000
- 39.🌈 In #750000 the red part is the hex number 75. What is it as a normal number?
- 40.🌈 Which colour is rgb(255, 0, 0)? (a) magenta (b) black (c) yellow (d) red
Answer key
- #ff0000
- green
- #0000ff
- #00ffff
- red
- red
- 250
- 109
- cyan
- blue
- magenta
- blue
- 3
- red
- 255
- blue
- red
- F
- 115
- bright green
- #ffff00
- black
- #000000
- white
- green
- cyan
- white
- green
- 68
- #ff00ff
- red
- red
- 107
- 191
- yellow
- 136
- 234
- #ffffff
- 117
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids