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.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) G (d) Z
- 2.🌈 Which hex code is magenta? (a) #ff00ff (b) #ffff00 (c) #ff0000 (d) #000000
- 3.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) white (c) yellow (d) black
- 4.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) bright green (c) cyan (d) magenta
- 5.🌈 Which colour is #ff00ff? (a) white (b) bright green (c) magenta (d) cyan
- 6.🌈 Which hex code is bright green? (a) #ffffff (b) #000000 (c) #ffff00 (d) #00ff00
- 7.🌈 Which colour is #00ff00? (a) yellow (b) cyan (c) white (d) bright green
- 8.🌈 In #000038 the blue part is the hex number 38. What is it as a normal number?
- 9.🌈 In #620000 the red part is the hex number 62. What is it as a normal number?
- 10.🌈 Which colour is rgb(255, 0, 255)? (a) red (b) magenta (c) black (d) blue
- 11.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) black (d) green
- 12.🌈 In #008a00 the green part is the hex number 8a. What is it as a normal number?
- 13.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) white (c) green (d) blue
- 14.🌈 Which colour of light is strongest in rgb(70, 81, 234)? (a) red (b) blue (c) green
- 15.🌈 Which colour of light is strongest in rgb(89, 253, 6)? (a) blue (b) red (c) green
- 16.🌈 Which colour of light is strongest in rgb(103, 38, 249)? (a) green (b) blue (c) red
- 17.🌈 In #f00000 the red part is the hex number f0. What is it as a normal number?
- 18.🌈 Which colour of light is strongest in rgb(172, 40, 32)? (a) blue (b) red (c) green
- 19.🌈 Which colour of light is strongest in rgb(184, 129, 54)? (a) red (b) green (c) blue
- 20.🌈 Which colour is #ffffff? (a) yellow (b) white (c) black (d) blue
- 21.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) magenta (c) yellow (d) red
- 22.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 100 (d) 1000
- 23.🌈 Which colour is #ffff00? (a) white (b) bright green (c) blue (d) yellow
- 24.🌈 In #000063 the blue part is the hex number 63. What is it as a normal number?
- 25.🌈 Which colour is #000000? (a) blue (b) red (c) black (d) white
- 26.🌈 Which colour of light is strongest in rgb(45, 158, 107)? (a) red (b) green (c) blue
- 27.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 6 (c) 3 (d) 4
- 28.🌈 In #290000 the red part is the hex number 29. What is it as a normal number?
- 29.🌈 Which colour is #ff0000? (a) red (b) black (c) bright green (d) blue
- 30.🌈 Which colour of light is strongest in rgb(132, 166, 2)? (a) red (b) green (c) blue
- 31.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) bright green (c) white (d) black
- 32.🌈 Which hex code is blue? (a) #0000ff (b) #ffffff (c) #ffff00 (d) #00ffff
- 33.🌈 In #6c0000 the red part is the hex number 6c. What is it as a normal number?
- 34.🌈 Which hex code is white? (a) #ff0000 (b) #ffffff (c) #00ffff (d) #ff00ff
- 35.🌈 Which hex code is black? (a) #ffffff (b) #000000 (c) #ff0000 (d) #ffff00
- 36.🌈 Which hex code is cyan? (a) #ffffff (b) #0000ff (c) #00ffff (d) #000000
- 37.🌈 In #0000c5 the blue part is the hex number c5. What is it as a normal number?
- 38.🌈 Which colour of light is strongest in rgb(2, 11, 225)? (a) red (b) green (c) blue
- 39.🌈 In #b40000 the red part is the hex number b4. What is it as a normal number?
- 40.🌈 Which hex code is yellow? (a) #ff0000 (b) #00ff00 (c) #ffff00 (d) #00ffff
Answer key
- F
- #ff00ff
- cyan
- blue
- magenta
- #00ff00
- bright green
- 56
- 98
- magenta
- red
- 138
- blue
- blue
- green
- blue
- 240
- red
- red
- white
- red
- 255
- yellow
- 99
- black
- green
- 3
- 41
- red
- green
- white
- #0000ff
- 108
- #ffffff
- #000000
- #00ffff
- 197
- blue
- 180
- #ffff00
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids