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 white? (a) #00ff00 (b) #000000 (c) #ff0000 (d) #ffffff
- 2.🌈 Which colour is #ff0000? (a) cyan (b) black (c) red (d) magenta
- 3.🌈 Which colour of light is strongest in rgb(133, 248, 120)? (a) blue (b) red (c) green
- 4.🌈 In #3b0000 the red part is the hex number 3b. What is it as a normal number?
- 5.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 4 (d) 2
- 6.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) white (c) magenta (d) bright green
- 7.🌈 Which hex code is bright green? (a) #ff00ff (b) #00ff00 (c) #0000ff (d) #ff0000
- 8.🌈 Which colour of light is strongest in rgb(59, 45, 184)? (a) red (b) blue (c) green
- 9.🌈 In #0000a6 the blue part is the hex number a6. What is it as a normal number?
- 10.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) yellow (c) cyan (d) red
- 11.🌈 Which hex code is yellow? (a) #00ffff (b) #ffff00 (c) #ffffff (d) #0000ff
- 12.🌈 Which colour is #ffff00? (a) blue (b) cyan (c) yellow (d) magenta
- 13.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) bright green (c) white (d) cyan
- 14.🌈 Which colour of light is strongest in rgb(34, 6, 150)? (a) red (b) green (c) blue
- 15.🌈 Which hex code is blue? (a) #00ffff (b) #0000ff (c) #ffffff (d) #ffff00
- 16.🌈 Which colour is #00ff00? (a) cyan (b) blue (c) magenta (d) bright green
- 17.🌈 In #4a0000 the red part is the hex number 4a. What is it as a normal number?
- 18.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 99 (d) 1000
- 19.🌈 In #4d0000 the red part is the hex number 4d. What is it as a normal number?
- 20.🌈 Which hex code is cyan? (a) #0000ff (b) #000000 (c) #00ffff (d) #ffff00
- 21.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) cyan (c) black (d) yellow
- 22.🌈 In #6a0000 the red part is the hex number 6a. What is it as a normal number?
- 23.🌈 Which colour of light is strongest in rgb(134, 129, 250)? (a) green (b) blue (c) red
- 24.🌈 Which colour of light is strongest in rgb(101, 106, 207)? (a) blue (b) red (c) green
- 25.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) black (d) red
- 26.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) F (d) Z
- 27.🌈 Which colour of light is strongest in rgb(114, 178, 34)? (a) red (b) green (c) blue
- 28.🌈 In #000059 the blue part is the hex number 59. What is it as a normal number?
- 29.🌈 Which colour of light is strongest in rgb(129, 94, 200)? (a) green (b) red (c) blue
- 30.🌈 In #001500 the green part is the hex number 15. What is it as a normal number?
- 31.🌈 Which colour is #00ffff? (a) cyan (b) yellow (c) red (d) bright green
- 32.🌈 Which colour of light is strongest in rgb(160, 11, 36)? (a) blue (b) green (c) red
- 33.🌈 Which hex code is red? (a) #00ff00 (b) #ff0000 (c) #00ffff (d) #000000
- 34.🌈 Which colour of light is strongest in rgb(28, 255, 31)? (a) red (b) green (c) blue
- 35.🌈 Which colour of light is strongest in rgb(53, 134, 218)? (a) red (b) blue (c) green
- 36.🌈 Which colour is rgb(255, 255, 0)? (a) black (b) bright green (c) magenta (d) yellow
- 37.🌈 In #000063 the blue part is the hex number 63. What is it as a normal number?
- 38.🌈 Which colour of light is strongest in rgb(96, 7, 154)? (a) green (b) blue (c) red
- 39.🌈 Which colour is #ff00ff? (a) magenta (b) red (c) white (d) yellow
- 40.🌈 In #000028 the blue part is the hex number 28. What is it as a normal number?
Answer key
- #ffffff
- red
- green
- 59
- 3
- blue
- #00ff00
- blue
- 166
- cyan
- #ffff00
- yellow
- bright green
- blue
- #0000ff
- bright green
- 74
- 255
- 77
- #00ffff
- black
- 106
- blue
- blue
- red
- F
- green
- 89
- blue
- 21
- cyan
- red
- #ff0000
- green
- blue
- yellow
- 99
- blue
- magenta
- 40
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids