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.🌈 In #7b0000 the red part is the hex number 7b. What is it as a normal number?
- 2.🌈 Which hex code is magenta? (a) #00ff00 (b) #ffff00 (c) #ff00ff (d) #ffffff
- 3.🌈 Which colour is #ff0000? (a) magenta (b) red (c) black (d) yellow
- 4.🌈 Which hex code is yellow? (a) #ff00ff (b) #0000ff (c) #ffff00 (d) #ffffff
- 5.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) black (c) magenta (d) yellow
- 6.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) G (d) F
- 7.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) red (c) green (d) white
- 8.🌈 Which hex code is cyan? (a) #000000 (b) #00ff00 (c) #00ffff (d) #ffffff
- 9.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) white (c) yellow (d) blue
- 10.🌈 Which hex code is black? (a) #000000 (b) #ff00ff (c) #00ffff (d) #ffff00
- 11.🌈 In #c40000 the red part is the hex number c4. What is it as a normal number?
- 12.🌈 Which colour of light is strongest in rgb(201, 91, 116)? (a) blue (b) green (c) red
- 13.🌈 Which colour is #ff00ff? (a) white (b) magenta (c) cyan (d) bright green
- 14.🌈 Which colour is #ffff00? (a) black (b) cyan (c) red (d) yellow
- 15.🌈 In #0000ef the blue part is the hex number ef. What is it as a normal number?
- 16.🌈 Which colour is #00ff00? (a) black (b) bright green (c) cyan (d) magenta
- 17.🌈 In #00be00 the green part is the hex number be. What is it as a normal number?
- 18.🌈 In #0000f3 the blue part is the hex number f3. What is it as a normal number?
- 19.🌈 In #002900 the green part is the hex number 29. What is it as a normal number?
- 20.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) black (d) green
- 21.🌈 In #490000 the red part is the hex number 49. What is it as a normal number?
- 22.🌈 In #0000ca the blue part is the hex number ca. What is it as a normal number?
- 23.🌈 Which hex code is bright green? (a) #00ff00 (b) #ffff00 (c) #ff0000 (d) #ffffff
- 24.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) bright green (c) black (d) blue
- 25.🌈 Which colour is #000000? (a) bright green (b) black (c) red (d) white
- 26.🌈 In #860000 the red part is the hex number 86. What is it as a normal number?
- 27.🌈 Which colour of light is strongest in rgb(31, 220, 38)? (a) blue (b) green (c) red
- 28.🌈 In #00002a the blue part is the hex number 2a. What is it as a normal number?
- 29.🌈 Which colour of light is strongest in rgb(100, 179, 13)? (a) red (b) blue (c) green
- 30.🌈 Which colour of light is strongest in rgb(176, 122, 13)? (a) blue (b) green (c) red
- 31.🌈 In #000067 the blue part is the hex number 67. What is it as a normal number?
- 32.🌈 Which colour of light is strongest in rgb(208, 79, 3)? (a) blue (b) red (c) green
- 33.🌈 Which colour is #00ffff? (a) cyan (b) yellow (c) white (d) black
- 34.🌈 Which hex code is red? (a) #0000ff (b) #ffff00 (c) #ff0000 (d) #000000
- 35.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 255 (d) 1000
- 36.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) black (c) blue (d) yellow
- 37.🌈 Which hex code is blue? (a) #00ffff (b) #00ff00 (c) #0000ff (d) #ff0000
- 38.🌈 Which colour is rgb(255, 0, 0)? (a) magenta (b) bright green (c) blue (d) red
- 39.🌈 In #450000 the red part is the hex number 45. What is it as a normal number?
- 40.🌈 In #d30000 the red part is the hex number d3. What is it as a normal number?
Answer key
- 123
- #ff00ff
- red
- #ffff00
- yellow
- F
- blue
- #00ffff
- cyan
- #000000
- 196
- red
- magenta
- yellow
- 239
- bright green
- 190
- 243
- 41
- red
- 73
- 202
- #00ff00
- black
- black
- 134
- green
- 42
- green
- red
- 103
- red
- cyan
- #ff0000
- 255
- blue
- #0000ff
- red
- 69
- 211
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids