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(10, 50, 189)? (a) red (b) green (c) blue
- 2.🌈 Which colour of light is strongest in rgb(75, 153, 11)? (a) blue (b) green (c) red
- 3.🌈 Which colour of light is strongest in rgb(26, 29, 155)? (a) blue (b) red (c) green
- 4.🌈 Which hex code is blue? (a) #ff0000 (b) #00ff00 (c) #ff00ff (d) #0000ff
- 5.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) red (d) blue
- 6.🌈 In #6e0000 the red part is the hex number 6e. What is it as a normal number?
- 7.🌈 Which colour is #00ff00? (a) bright green (b) white (c) black (d) cyan
- 8.🌈 In #000094 the blue part is the hex number 94. What is it as a normal number?
- 9.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) white (d) blue
- 10.🌈 Which colour of light is strongest in rgb(227, 6, 57)? (a) green (b) red (c) blue
- 11.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 6 (c) 4 (d) 3
- 12.🌈 Which colour is rgb(255, 0, 255)? (a) blue (b) white (c) bright green (d) magenta
- 13.🌈 Which colour of light is strongest in rgb(110, 251, 30)? (a) red (b) blue (c) green
- 14.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) J (d) F
- 15.🌈 Which colour of light is strongest in rgb(137, 178, 111)? (a) red (b) blue (c) green
- 16.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) yellow (c) white (d) blue
- 17.🌈 Which colour is #ff0000? (a) red (b) magenta (c) white (d) blue
- 18.🌈 In #b40000 the red part is the hex number b4. What is it as a normal number?
- 19.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) white (c) cyan (d) magenta
- 20.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) black (c) cyan (d) white
- 21.🌈 Which colour of light is strongest in rgb(26, 151, 97)? (a) green (b) blue (c) red
- 22.🌈 In #0000c9 the blue part is the hex number c9. What is it as a normal number?
- 23.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) blue (c) magenta (d) red
- 24.🌈 In #00e600 the green part is the hex number e6. What is it as a normal number?
- 25.🌈 In #000056 the blue part is the hex number 56. What is it as a normal number?
- 26.🌈 Which hex code is magenta? (a) #ff0000 (b) #0000ff (c) #ff00ff (d) #ffff00
- 27.🌈 Which colour of light is strongest in rgb(66, 184, 32)? (a) red (b) blue (c) green
- 28.🌈 Which colour of light is strongest in rgb(106, 220, 79)? (a) red (b) blue (c) green
- 29.🌈 Which colour of light is strongest in rgb(210, 31, 104)? (a) green (b) blue (c) red
- 30.🌈 In #000c00 the green part is the hex number 0c. What is it as a normal number?
- 31.🌈 Which hex code is yellow? (a) #0000ff (b) #000000 (c) #ffff00 (d) #ff0000
- 32.🌈 In #001c00 the green part is the hex number 1c. What is it as a normal number?
- 33.🌈 Which hex code is cyan? (a) #00ff00 (b) #00ffff (c) #ff00ff (d) #ff0000
- 34.🌈 In #00009f the blue part is the hex number 9f. What is it as a normal number?
- 35.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) blue (c) black (d) bright green
- 36.🌈 In #7c0000 the red part is the hex number 7c. What is it as a normal number?
- 37.🌈 Which hex code is bright green? (a) #00ff00 (b) #ff0000 (c) #ff00ff (d) #00ffff
- 38.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 99 (c) 100 (d) 255
- 39.🌈 Which colour of light is strongest in rgb(164, 55, 44)? (a) blue (b) red (c) green
- 40.🌈 In #00cf00 the green part is the hex number cf. What is it as a normal number?
Answer key
- blue
- green
- blue
- #0000ff
- red
- 110
- bright green
- 148
- blue
- red
- 3
- magenta
- green
- F
- green
- yellow
- red
- 180
- cyan
- blue
- green
- 201
- bright green
- 230
- 86
- #ff00ff
- green
- green
- red
- 12
- #ffff00
- 28
- #00ffff
- 159
- black
- 124
- #00ff00
- 255
- red
- 207
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids