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 of light is strongest in rgb(235, 98, 131)? (a) green (b) red (c) blue
- 2.🌈 Which hex code is yellow? (a) #ff00ff (b) #ffff00 (c) #00ff00 (d) #0000ff
- 3.🌈 Which colour of light is strongest in rgb(245, 123, 62)? (a) blue (b) green (c) red
- 4.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 2 (d) 6
- 5.🌈 Which colour is #00ffff? (a) magenta (b) bright green (c) cyan (d) yellow
- 6.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 255 (d) 99
- 7.🌈 Which hex code is red? (a) #000000 (b) #ffffff (c) #ff00ff (d) #ff0000
- 8.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) white (c) red (d) cyan
- 9.🌈 Which colour is #00ff00? (a) bright green (b) blue (c) yellow (d) red
- 10.🌈 In #001000 the green part is the hex number 10. What is it as a normal number?
- 11.🌈 Which colour of light is strongest in rgb(198, 55, 17)? (a) red (b) blue (c) green
- 12.🌈 Which colour is #ff00ff? (a) cyan (b) magenta (c) white (d) yellow
- 13.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) yellow (c) blue (d) bright green
- 14.🌈 Which colour is #ffffff? (a) red (b) white (c) black (d) cyan
- 15.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) green (c) blue (d) black
- 16.🌈 Which colour is #000000? (a) bright green (b) yellow (c) black (d) blue
- 17.🌈 Which colour of light is strongest in rgb(10, 195, 96)? (a) blue (b) green (c) red
- 18.🌈 Which colour is #ff0000? (a) magenta (b) blue (c) yellow (d) red
- 19.🌈 In #00007e the blue part is the hex number 7e. What is it as a normal number?
- 20.🌈 Which hex code is black? (a) #000000 (b) #00ffff (c) #0000ff (d) #ffff00
- 21.🌈 Which hex code is magenta? (a) #ff00ff (b) #ffffff (c) #ff0000 (d) #ffff00
- 22.🌈 Which colour of light is strongest in rgb(106, 155, 5)? (a) blue (b) green (c) red
- 23.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) red (d) blue
- 24.🌈 In #ea0000 the red part is the hex number ea. What is it as a normal number?
- 25.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) magenta (c) white (d) bright green
- 26.🌈 Which hex code is bright green? (a) #ffff00 (b) #ff00ff (c) #00ff00 (d) #ffffff
- 27.🌈 In #d80000 the red part is the hex number d8. What is it as a normal number?
- 28.🌈 Which colour of light is strongest in rgb(132, 60, 221)? (a) red (b) green (c) blue
- 29.🌈 Which colour is #ffff00? (a) white (b) cyan (c) blue (d) yellow
- 30.🌈 Which hex code is blue? (a) #ffff00 (b) #0000ff (c) #00ffff (d) #00ff00
- 31.🌈 Which colour is rgb(255, 0, 255)? (a) red (b) magenta (c) bright green (d) yellow
- 32.🌈 Which hex code is cyan? (a) #000000 (b) #0000ff (c) #00ff00 (d) #00ffff
- 33.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) yellow (c) white (d) magenta
- 34.🌈 In #002900 the green part is the hex number 29. What is it as a normal number?
- 35.🌈 In #000700 the green part is the hex number 07. What is it as a normal number?
- 36.🌈 Which colour of light is strongest in rgb(237, 51, 123)? (a) green (b) red (c) blue
- 37.🌈 Which colour of light is strongest in rgb(33, 131, 159)? (a) green (b) red (c) blue
- 38.🌈 In #4b0000 the red part is the hex number 4b. What is it as a normal number?
- 39.🌈 Which colour of light is strongest in rgb(130, 160, 65)? (a) blue (b) green (c) red
- 40.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) F (c) G (d) J
Answer key
- red
- #ffff00
- red
- 3
- cyan
- 255
- #ff0000
- red
- bright green
- 16
- red
- magenta
- yellow
- white
- red
- black
- green
- red
- 126
- #000000
- #ff00ff
- green
- blue
- 234
- bright green
- #00ff00
- 216
- blue
- yellow
- #0000ff
- magenta
- #00ffff
- white
- 41
- 7
- red
- blue
- 75
- green
- F
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids