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 black? (a) #0000ff (b) #ffffff (c) #000000 (d) #ff00ff
- 2.🌈 Which colour of light is strongest in rgb(109, 116, 218)? (a) blue (b) green (c) red
- 3.🌈 Which colour is #ffff00? (a) red (b) white (c) blue (d) yellow
- 4.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) red (d) green
- 5.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 255 (d) 99
- 6.🌈 Which hex code is red? (a) #0000ff (b) #00ffff (c) #ff0000 (d) #ffff00
- 7.🌈 In #00a900 the green part is the hex number a9. What is it as a normal number?
- 8.🌈 In #005c00 the green part is the hex number 5c. What is it as a normal number?
- 9.🌈 In #0000f1 the blue part is the hex number f1. What is it as a normal number?
- 10.🌈 Which colour is rgb(0, 255, 255)? (a) magenta (b) yellow (c) cyan (d) white
- 11.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) red (c) yellow (d) white
- 12.🌈 Which colour is rgb(0, 255, 0)? (a) cyan (b) bright green (c) magenta (d) blue
- 13.🌈 Which colour of light is strongest in rgb(96, 197, 106)? (a) blue (b) red (c) green
- 14.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) black (c) cyan (d) yellow
- 15.🌈 Which colour of light is strongest in rgb(30, 117, 150)? (a) green (b) red (c) blue
- 16.🌈 Which colour is #00ff00? (a) blue (b) red (c) bright green (d) black
- 17.🌈 Which hex code is magenta? (a) #00ffff (b) #ff0000 (c) #00ff00 (d) #ff00ff
- 18.🌈 Which colour is #0000ff? (a) magenta (b) blue (c) white (d) red
- 19.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) bright green (c) yellow (d) red
- 20.🌈 In #bc0000 the red part is the hex number bc. What is it as a normal number?
- 21.🌈 Which hex code is cyan? (a) #ffffff (b) #ffff00 (c) #00ff00 (d) #00ffff
- 22.🌈 Which colour of light is strongest in rgb(253, 32, 33)? (a) blue (b) green (c) red
- 23.🌈 Which colour of light is strongest in rgb(43, 248, 46)? (a) green (b) blue (c) red
- 24.🌈 In #006000 the green part is the hex number 60. What is it as a normal number?
- 25.🌈 In #a00000 the red part is the hex number a0. What is it as a normal number?
- 26.🌈 In #000061 the blue part is the hex number 61. What is it as a normal number?
- 27.🌈 Which colour of light is strongest in rgb(69, 124, 182)? (a) green (b) blue (c) red
- 28.🌈 Which hex code is yellow? (a) #00ffff (b) #ffffff (c) #ff0000 (d) #ffff00
- 29.🌈 Which hex code is white? (a) #0000ff (b) #ffffff (c) #ffff00 (d) #00ff00
- 30.🌈 Which colour of light is strongest in rgb(55, 158, 75)? (a) red (b) green (c) blue
- 31.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) F (d) G
- 32.🌈 In #004b00 the green part is the hex number 4b. What is it as a normal number?
- 33.🌈 In #005a00 the green part is the hex number 5a. What is it as a normal number?
- 34.🌈 Which colour of light is strongest in rgb(237, 40, 3)? (a) blue (b) red (c) green
- 35.🌈 In #00eb00 the green part is the hex number eb. What is it as a normal number?
- 36.🌈 In #410000 the red part is the hex number 41. What is it as a normal number?
- 37.🌈 In #ac0000 the red part is the hex number ac. What is it as a normal number?
- 38.🌈 In #003800 the green part is the hex number 38. What is it as a normal number?
- 39.🌈 In #000008 the blue part is the hex number 08. What is it as a normal number?
- 40.🌈 In #b00000 the red part is the hex number b0. What is it as a normal number?
Answer key
- #000000
- blue
- yellow
- red
- 255
- #ff0000
- 169
- 92
- 241
- cyan
- red
- bright green
- green
- blue
- blue
- bright green
- #ff00ff
- blue
- black
- 188
- #00ffff
- red
- green
- 96
- 160
- 97
- blue
- #ffff00
- #ffffff
- green
- F
- 75
- 90
- red
- 235
- 65
- 172
- 56
- 8
- 176
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids