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 magenta? (a) #ff0000 (b) #00ffff (c) #ff00ff (d) #00ff00
- 2.🌈 Which colour of light is strongest in rgb(133, 152, 126)? (a) red (b) green (c) blue
- 3.🌈 In #001200 the green part is the hex number 12. What is it as a normal number?
- 4.🌈 Which colour of light is strongest in rgb(75, 253, 113)? (a) blue (b) red (c) green
- 5.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) magenta (c) white (d) red
- 6.🌈 Which colour of light is strongest in rgb(182, 13, 89)? (a) blue (b) red (c) green
- 7.🌈 Which colour is #00ffff? (a) cyan (b) magenta (c) bright green (d) white
- 8.🌈 Which colour is #ffff00? (a) black (b) yellow (c) cyan (d) blue
- 9.🌈 Which colour of light is strongest in rgb(173, 50, 102)? (a) red (b) blue (c) green
- 10.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 99 (d) 255
- 11.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) blue (d) red
- 12.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) G (d) F
- 13.🌈 Which colour of light is strongest in rgb(15, 22, 248)? (a) blue (b) red (c) green
- 14.🌈 In #005600 the green part is the hex number 56. What is it as a normal number?
- 15.🌈 Which colour of light is strongest in rgb(19, 97, 238)? (a) red (b) green (c) blue
- 16.🌈 Which hex code is black? (a) #ff0000 (b) #00ff00 (c) #ff00ff (d) #000000
- 17.🌈 Which colour is #ff00ff? (a) bright green (b) cyan (c) magenta (d) blue
- 18.🌈 Which hex code is blue? (a) #ffffff (b) #0000ff (c) #ff0000 (d) #00ff00
- 19.🌈 Which colour of light is strongest in rgb(103, 249, 106)? (a) blue (b) red (c) green
- 20.🌈 Which colour is #00ff00? (a) bright green (b) red (c) yellow (d) magenta
- 21.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) white (c) black (d) magenta
- 22.🌈 Which hex code is yellow? (a) #ffff00 (b) #00ffff (c) #ffffff (d) #000000
- 23.🌈 Which colour of light is strongest in rgb(25, 31, 177)? (a) blue (b) red (c) green
- 24.🌈 In #940000 the red part is the hex number 94. What is it as a normal number?
- 25.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) green (c) blue (d) black
- 26.🌈 Which colour of light is strongest in rgb(12, 207, 81)? (a) green (b) red (c) blue
- 27.🌈 Which colour of light is strongest in rgb(14, 174, 19)? (a) red (b) green (c) blue
- 28.🌈 In #730000 the red part is the hex number 73. What is it as a normal number?
- 29.🌈 In #00f800 the green part is the hex number f8. What is it as a normal number?
- 30.🌈 Which colour of light is strongest in rgb(59, 190, 7)? (a) red (b) blue (c) green
- 31.🌈 Which hex code is cyan? (a) #0000ff (b) #000000 (c) #ffff00 (d) #00ffff
- 32.🌈 In #003900 the green part is the hex number 39. What is it as a normal number?
- 33.🌈 Which colour of light is strongest in rgb(171, 44, 105)? (a) blue (b) red (c) green
- 34.🌈 In #550000 the red part is the hex number 55. What is it as a normal number?
- 35.🌈 Which colour is #ffffff? (a) cyan (b) white (c) blue (d) black
- 36.🌈 Which colour of light is strongest in rgb(232, 31, 22)? (a) green (b) red (c) blue
- 37.🌈 In #00d300 the green part is the hex number d3. What is it as a normal number?
- 38.🌈 Which colour of light is strongest in rgb(227, 10, 39)? (a) green (b) blue (c) red
- 39.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) black (c) blue (d) red
- 40.🌈 Which colour of light is strongest in rgb(37, 218, 66)? (a) blue (b) red (c) green
Answer key
- #ff00ff
- green
- 18
- green
- white
- red
- cyan
- yellow
- red
- 255
- blue
- F
- blue
- 86
- blue
- #000000
- magenta
- #0000ff
- green
- bright green
- yellow
- #ffff00
- blue
- 148
- red
- green
- green
- 115
- 248
- green
- #00ffff
- 57
- red
- 85
- white
- red
- 211
- red
- magenta
- green
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids