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 #810000 the red part is the hex number 81. What is it as a normal number?
- 2.🌈 Which colour is #ff0000? (a) yellow (b) cyan (c) bright green (d) red
- 3.🌈 Which hex code is magenta? (a) #ffffff (b) #ff0000 (c) #ff00ff (d) #000000
- 4.🌈 Which hex code is bright green? (a) #ffffff (b) #000000 (c) #0000ff (d) #00ff00
- 5.🌈 Which colour is #ff00ff? (a) white (b) bright green (c) cyan (d) magenta
- 6.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) F (c) Z (d) J
- 7.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 3 (d) 6
- 8.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) black (c) green (d) blue
- 9.🌈 Which colour of light is strongest in rgb(92, 157, 33)? (a) green (b) blue (c) red
- 10.🌈 In #0000a2 the blue part is the hex number a2. What is it as a normal number?
- 11.🌈 Which hex code is blue? (a) #0000ff (b) #000000 (c) #ffffff (d) #00ff00
- 12.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) green (d) blue
- 13.🌈 In #00a200 the green part is the hex number a2. What is it as a normal number?
- 14.🌈 Which colour is #0000ff? (a) magenta (b) bright green (c) cyan (d) blue
- 15.🌈 Which colour is #ffff00? (a) red (b) bright green (c) magenta (d) yellow
- 16.🌈 Which colour of light is strongest in rgb(212, 37, 3)? (a) green (b) red (c) blue
- 17.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) black (c) yellow (d) red
- 18.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) black (c) magenta (d) bright green
- 19.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 255 (c) 1000 (d) 99
- 20.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) bright green (c) black (d) blue
- 21.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) bright green (c) blue (d) white
- 22.🌈 Which hex code is yellow? (a) #ffff00 (b) #ff00ff (c) #0000ff (d) #ffffff
- 23.🌈 In #000034 the blue part is the hex number 34. What is it as a normal number?
- 24.🌈 In #000085 the blue part is the hex number 85. What is it as a normal number?
- 25.🌈 Which colour of light is strongest in rgb(183, 82, 59)? (a) blue (b) green (c) red
- 26.🌈 Which hex code is black? (a) #000000 (b) #0000ff (c) #00ff00 (d) #ff0000
- 27.🌈 In #000054 the blue part is the hex number 54. What is it as a normal number?
- 28.🌈 Which colour of light is strongest in rgb(96, 192, 83)? (a) green (b) red (c) blue
- 29.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) white (c) cyan (d) yellow
- 30.🌈 Which colour of light is strongest in rgb(202, 29, 107)? (a) blue (b) green (c) red
- 31.🌈 Which colour of light is strongest in rgb(134, 4, 160)? (a) red (b) green (c) blue
- 32.🌈 Which hex code is red? (a) #ffff00 (b) #ff00ff (c) #0000ff (d) #ff0000
- 33.🌈 Which colour is rgb(255, 255, 255)? (a) red (b) bright green (c) yellow (d) white
- 34.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) yellow (c) black (d) red
- 35.🌈 Which colour of light is strongest in rgb(59, 161, 65)? (a) green (b) blue (c) red
- 36.🌈 Which colour is #ffffff? (a) bright green (b) blue (c) red (d) white
- 37.🌈 In #b80000 the red part is the hex number b8. What is it as a normal number?
- 38.🌈 Which colour of light is strongest in rgb(151, 83, 59)? (a) red (b) green (c) blue
- 39.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) magenta (c) yellow (d) white
- 40.🌈 Which colour is #00ff00? (a) yellow (b) bright green (c) red (d) magenta
Answer key
- 129
- red
- #ff00ff
- #00ff00
- magenta
- F
- 3
- red
- green
- 162
- #0000ff
- blue
- 162
- blue
- yellow
- red
- yellow
- black
- 255
- bright green
- blue
- #ffff00
- 52
- 133
- red
- #000000
- 84
- green
- cyan
- red
- blue
- #ff0000
- white
- red
- green
- white
- 184
- red
- magenta
- bright green
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids