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 #ff00ff? (a) blue (b) white (c) magenta (d) red
- 2.🌈 In #450000 the red part is the hex number 45. What is it as a normal number?
- 3.🌈 Which hex code is blue? (a) #ffff00 (b) #ff0000 (c) #00ffff (d) #0000ff
- 4.🌈 Which colour of light is strongest in rgb(118, 112, 249)? (a) blue (b) green (c) red
- 5.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 6 (c) 3 (d) 4
- 6.🌈 In #00c700 the green part is the hex number c7. What is it as a normal number?
- 7.🌈 Which hex code is magenta? (a) #ff00ff (b) #ffffff (c) #0000ff (d) #ffff00
- 8.🌈 Which hex code is red? (a) #00ff00 (b) #ff0000 (c) #000000 (d) #ff00ff
- 9.🌈 Which colour of light is strongest in rgb(131, 151, 69)? (a) blue (b) green (c) red
- 10.🌈 In #006100 the green part is the hex number 61. What is it as a normal number?
- 11.🌈 Which hex code is black? (a) #0000ff (b) #ffffff (c) #000000 (d) #ffff00
- 12.🌈 Which colour of light is strongest in rgb(16, 154, 116)? (a) blue (b) red (c) green
- 13.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) blue (d) red
- 14.🌈 In #0000a7 the blue part is the hex number a7. What is it as a normal number?
- 15.🌈 Which colour is #0000ff? (a) black (b) magenta (c) blue (d) cyan
- 16.🌈 Which colour of light is strongest in rgb(94, 54, 242)? (a) red (b) green (c) blue
- 17.🌈 Which hex code is bright green? (a) #ffff00 (b) #ff00ff (c) #00ff00 (d) #0000ff
- 18.🌈 In #520000 the red part is the hex number 52. What is it as a normal number?
- 19.🌈 In #005300 the green part is the hex number 53. What is it as a normal number?
- 20.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) white (c) bright green (d) cyan
- 21.🌈 Which hex code is cyan? (a) #ff0000 (b) #000000 (c) #00ffff (d) #00ff00
- 22.🌈 In #003d00 the green part is the hex number 3d. What is it as a normal number?
- 23.🌈 Which colour is #000000? (a) bright green (b) red (c) yellow (d) black
- 24.🌈 Which colour of light is strongest in rgb(49, 112, 243)? (a) blue (b) green (c) red
- 25.🌈 Which hex code is white? (a) #000000 (b) #00ff00 (c) #ff00ff (d) #ffffff
- 26.🌈 Which colour of light is strongest in rgb(73, 253, 123)? (a) blue (b) green (c) red
- 27.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) red (d) blue
- 28.🌈 Which colour of light is strongest in rgb(224, 50, 134)? (a) blue (b) red (c) green
- 29.🌈 In #000066 the blue part is the hex number 66. What is it as a normal number?
- 30.🌈 In #0000e6 the blue part is the hex number e6. What is it as a normal number?
- 31.🌈 Which colour of light is strongest in rgb(104, 254, 85)? (a) blue (b) green (c) red
- 32.🌈 Which colour of light is strongest in rgb(129, 207, 77)? (a) blue (b) green (c) red
- 33.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) J (d) Z
- 34.🌈 In #490000 the red part is the hex number 49. What is it as a normal number?
- 35.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 1000 (c) 100 (d) 255
- 36.🌈 In #d90000 the red part is the hex number d9. What is it as a normal number?
- 37.🌈 Which colour is #00ffff? (a) cyan (b) magenta (c) red (d) bright green
- 38.🌈 Which colour is #ff0000? (a) magenta (b) black (c) white (d) red
- 39.🌈 In #d00000 the red part is the hex number d0. What is it as a normal number?
- 40.🌈 Which hex code is yellow? (a) #ff0000 (b) #ff00ff (c) #ffff00 (d) #000000
Answer key
- magenta
- 69
- #0000ff
- blue
- 3
- 199
- #ff00ff
- #ff0000
- green
- 97
- #000000
- green
- red
- 167
- blue
- blue
- #00ff00
- 82
- 83
- cyan
- #00ffff
- 61
- black
- blue
- #ffffff
- green
- blue
- red
- 102
- 230
- green
- green
- F
- 73
- 255
- 217
- cyan
- red
- 208
- #ffff00
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids