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 #ff0000? (a) blue (b) red (c) cyan (d) bright green
- 2.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) black (c) yellow (d) bright green
- 3.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) black (c) magenta (d) yellow
- 4.🌈 Which hex code is cyan? (a) #ffff00 (b) #ff0000 (c) #0000ff (d) #00ffff
- 5.🌈 Which hex code is white? (a) #000000 (b) #ff0000 (c) #ff00ff (d) #ffffff
- 6.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) F (c) J (d) Z
- 7.🌈 Which colour of light is strongest in rgb(156, 12, 21)? (a) green (b) red (c) blue
- 8.🌈 Which colour is #00ff00? (a) black (b) cyan (c) magenta (d) bright green
- 9.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) blue (d) red
- 10.🌈 Which hex code is blue? (a) #00ff00 (b) #0000ff (c) #ffff00 (d) #ff0000
- 11.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) blue (c) red (d) cyan
- 12.🌈 Which hex code is magenta? (a) #ff0000 (b) #00ff00 (c) #ffffff (d) #ff00ff
- 13.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 255 (d) 1000
- 14.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) magenta (c) red (d) black
- 15.🌈 Which colour is #ff00ff? (a) magenta (b) white (c) cyan (d) yellow
- 16.🌈 Which colour of light is strongest in rgb(157, 105, 54)? (a) green (b) blue (c) red
- 17.🌈 Which colour is #000000? (a) white (b) blue (c) yellow (d) black
- 18.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) bright green (c) blue (d) white
- 19.🌈 In #730000 the red part is the hex number 73. What is it as a normal number?
- 20.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) white (c) cyan (d) blue
- 21.🌈 Which colour of light is strongest in rgb(166, 9, 122)? (a) red (b) green (c) blue
- 22.🌈 Which colour is rgb(255, 255, 0)? (a) black (b) yellow (c) bright green (d) magenta
- 23.🌈 Which colour is #00ffff? (a) red (b) blue (c) black (d) cyan
- 24.🌈 In #006c00 the green part is the hex number 6c. What is it as a normal number?
- 25.🌈 Which hex code is bright green? (a) #0000ff (b) #00ff00 (c) #ffffff (d) #ff0000
- 26.🌈 In #000b00 the green part is the hex number 0b. What is it as a normal number?
- 27.🌈 Which colour of light is strongest in rgb(27, 11, 232)? (a) blue (b) red (c) green
- 28.🌈 In #008800 the green part is the hex number 88. What is it as a normal number?
- 29.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) bright green (c) black (d) blue
- 30.🌈 In #5c0000 the red part is the hex number 5c. What is it as a normal number?
- 31.🌈 In #000069 the blue part is the hex number 69. What is it as a normal number?
- 32.🌈 In #360000 the red part is the hex number 36. What is it as a normal number?
- 33.🌈 Which hex code is black? (a) #ff00ff (b) #ff0000 (c) #ffff00 (d) #000000
- 34.🌈 Which colour of light is strongest in rgb(181, 19, 117)? (a) blue (b) red (c) green
- 35.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
- 36.🌈 In #00001d the blue part is the hex number 1d. What is it as a normal number?
- 37.🌈 In #000016 the blue part is the hex number 16. What is it as a normal number?
- 38.🌈 Which colour of light is strongest in rgb(248, 73, 107)? (a) red (b) green (c) blue
- 39.🌈 Which colour of light is strongest in rgb(15, 250, 88)? (a) green (b) blue (c) red
- 40.🌈 In #00007f the blue part is the hex number 7f. What is it as a normal number?
Answer key
- red
- red
- magenta
- #00ffff
- #ffffff
- F
- red
- bright green
- blue
- #0000ff
- blue
- #ff00ff
- 255
- bright green
- magenta
- red
- black
- white
- 115
- cyan
- red
- yellow
- cyan
- 108
- #00ff00
- 11
- blue
- 136
- black
- 92
- 105
- 54
- #000000
- red
- red
- 29
- 22
- red
- green
- 127
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids