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(42, 226, 126)? (a) red (b) green (c) blue
- 2.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) Z (d) G
- 3.🌈 Which colour is #ffffff? (a) bright green (b) red (c) white (d) yellow
- 4.🌈 Which colour of light is strongest in rgb(175, 14, 92)? (a) green (b) red (c) blue
- 5.🌈 In #00bb00 the green part is the hex number bb. What is it as a normal number?
- 6.🌈 Which hex code is blue? (a) #00ff00 (b) #00ffff (c) #0000ff (d) #ff00ff
- 7.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) magenta (c) cyan (d) white
- 8.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) black (d) green
- 9.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 2 (d) 3
- 10.🌈 In #250000 the red part is the hex number 25. What is it as a normal number?
- 11.🌈 Which colour of light is strongest in rgb(172, 116, 106)? (a) blue (b) green (c) red
- 12.🌈 Which colour of light is strongest in rgb(227, 88, 23)? (a) green (b) red (c) blue
- 13.🌈 In #000092 the blue part is the hex number 92. What is it as a normal number?
- 14.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) white (c) bright green (d) black
- 15.🌈 Which colour is rgb(255, 0, 0)? (a) magenta (b) red (c) yellow (d) white
- 16.🌈 Which colour is #ff00ff? (a) blue (b) magenta (c) white (d) bright green
- 17.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) yellow (c) red (d) blue
- 18.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) cyan (c) black (d) white
- 19.🌈 Which colour is #ffff00? (a) red (b) black (c) yellow (d) bright green
- 20.🌈 In #000037 the blue part is the hex number 37. What is it as a normal number?
- 21.🌈 Which hex code is black? (a) #00ff00 (b) #ffffff (c) #000000 (d) #0000ff
- 22.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) green (d) blue
- 23.🌈 Which colour is #000000? (a) black (b) white (c) blue (d) red
- 24.🌈 In #e50000 the red part is the hex number e5. What is it as a normal number?
- 25.🌈 Which colour is rgb(0, 0, 0)? (a) blue (b) yellow (c) black (d) white
- 26.🌈 In #000062 the blue part is the hex number 62. What is it as a normal number?
- 27.🌈 Which colour of light is strongest in rgb(17, 155, 54)? (a) blue (b) red (c) green
- 28.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 1000 (d) 100
- 29.🌈 In #180000 the red part is the hex number 18. What is it as a normal number?
- 30.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) white (c) black (d) blue
- 31.🌈 Which colour is #0000ff? (a) red (b) cyan (c) blue (d) magenta
- 32.🌈 In #007300 the green part is the hex number 73. What is it as a normal number?
- 33.🌈 Which hex code is bright green? (a) #00ff00 (b) #ffffff (c) #ffff00 (d) #0000ff
- 34.🌈 In #c50000 the red part is the hex number c5. What is it as a normal number?
- 35.🌈 In #f00000 the red part is the hex number f0. What is it as a normal number?
- 36.🌈 Which hex code is white? (a) #ffffff (b) #ffff00 (c) #00ff00 (d) #ff0000
- 37.🌈 Which colour of light is strongest in rgb(151, 86, 136)? (a) green (b) blue (c) red
- 38.🌈 Which colour of light is strongest in rgb(228, 65, 8)? (a) blue (b) red (c) green
- 39.🌈 In #001700 the green part is the hex number 17. What is it as a normal number?
- 40.🌈 Which colour is #ff0000? (a) red (b) cyan (c) black (d) yellow
Answer key
- green
- F
- white
- red
- 187
- #0000ff
- magenta
- red
- 3
- 37
- red
- red
- 146
- bright green
- red
- magenta
- yellow
- white
- yellow
- 55
- #000000
- blue
- black
- 229
- black
- 98
- green
- 255
- 24
- blue
- blue
- 115
- #00ff00
- 197
- 240
- #ffffff
- red
- red
- 23
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids