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 rgb(0, 255, 0)? (a) bright green (b) blue (c) white (d) cyan
- 2.🌈 Which colour is #ff00ff? (a) yellow (b) bright green (c) magenta (d) blue
- 3.🌈 Which colour is rgb(0, 0, 255)? (a) white (b) yellow (c) cyan (d) blue
- 4.🌈 Which colour of light is strongest in rgb(31, 94, 167)? (a) green (b) blue (c) red
- 5.🌈 Which colour of light is strongest in rgb(157, 25, 4)? (a) blue (b) red (c) green
- 6.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) F (d) J
- 7.🌈 Which colour of light is strongest in rgb(166, 72, 34)? (a) green (b) blue (c) red
- 8.🌈 Which colour is #00ffff? (a) red (b) yellow (c) cyan (d) black
- 9.🌈 Which colour is #ffff00? (a) red (b) yellow (c) white (d) bright green
- 10.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 6 (c) 4 (d) 2
- 11.🌈 Which colour of light is strongest in rgb(178, 5, 103)? (a) red (b) blue (c) green
- 12.🌈 In #00000e the blue part is the hex number 0e. What is it as a normal number?
- 13.🌈 Which colour of light is strongest in rgb(73, 91, 248)? (a) red (b) green (c) blue
- 14.🌈 In #001c00 the green part is the hex number 1c. What is it as a normal number?
- 15.🌈 Which hex code is bright green? (a) #ffff00 (b) #00ff00 (c) #000000 (d) #ff0000
- 16.🌈 Which hex code is blue? (a) #0000ff (b) #00ffff (c) #000000 (d) #ffff00
- 17.🌈 Which hex code is black? (a) #ffffff (b) #000000 (c) #ffff00 (d) #ff0000
- 18.🌈 In #000019 the blue part is the hex number 19. What is it as a normal number?
- 19.🌈 In #600000 the red part is the hex number 60. What is it as a normal number?
- 20.🌈 Which colour of light is strongest in rgb(41, 162, 24)? (a) blue (b) green (c) red
- 21.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) white (d) blue
- 22.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) green (c) black (d) blue
- 23.🌈 In #100000 the red part is the hex number 10. What is it as a normal number?
- 24.🌈 In #000058 the blue part is the hex number 58. What is it as a normal number?
- 25.🌈 Which colour of light is strongest in rgb(46, 248, 140)? (a) green (b) blue (c) red
- 26.🌈 Which colour is #ffffff? (a) blue (b) red (c) white (d) yellow
- 27.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) magenta (c) cyan (d) blue
- 28.🌈 Which hex code is cyan? (a) #ffff00 (b) #0000ff (c) #000000 (d) #00ffff
- 29.🌈 Which colour of light is strongest in rgb(167, 82, 44)? (a) blue (b) red (c) green
- 30.🌈 In #590000 the red part is the hex number 59. What is it as a normal number?
- 31.🌈 Which hex code is white? (a) #ff0000 (b) #00ffff (c) #0000ff (d) #ffffff
- 32.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 99 (c) 100 (d) 255
- 33.🌈 Which colour of light is strongest in rgb(243, 11, 73)? (a) green (b) blue (c) red
- 34.🌈 In #850000 the red part is the hex number 85. What is it as a normal number?
- 35.🌈 Which colour of light is strongest in rgb(196, 82, 9)? (a) red (b) blue (c) green
- 36.🌈 In #002100 the green part is the hex number 21. What is it as a normal number?
- 37.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) blue (c) cyan (d) red
- 38.🌈 In #eb0000 the red part is the hex number eb. What is it as a normal number?
- 39.🌈 In #000600 the green part is the hex number 06. What is it as a normal number?
- 40.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) cyan (c) red (d) blue
Answer key
- bright green
- magenta
- blue
- blue
- red
- F
- red
- cyan
- yellow
- 3
- red
- 14
- blue
- 28
- #00ff00
- #0000ff
- #000000
- 25
- 96
- green
- blue
- red
- 16
- 88
- green
- white
- magenta
- #00ffff
- red
- 89
- #ffffff
- 255
- red
- 133
- red
- 33
- red
- 235
- 6
- white
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids