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 yellow? (a) #ff00ff (b) #0000ff (c) #ffff00 (d) #00ffff
- 2.🌈 Which colour is #000000? (a) bright green (b) red (c) cyan (d) black
- 3.🌈 Which hex code is cyan? (a) #00ff00 (b) #ffff00 (c) #000000 (d) #00ffff
- 4.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) blue (c) white (d) magenta
- 5.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) black (d) blue
- 6.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) bright green (c) white (d) red
- 7.🌈 In #f70000 the red part is the hex number f7. What is it as a normal number?
- 8.🌈 Which colour is #00ffff? (a) cyan (b) white (c) yellow (d) red
- 9.🌈 Which colour is #0000ff? (a) yellow (b) blue (c) bright green (d) magenta
- 10.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) bright green (c) red (d) blue
- 11.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) red (d) green
- 12.🌈 Which colour of light is strongest in rgb(31, 103, 168)? (a) green (b) red (c) blue
- 13.🌈 Which colour is #ff00ff? (a) magenta (b) black (c) bright green (d) blue
- 14.🌈 Which colour is #00ff00? (a) magenta (b) white (c) yellow (d) bright green
- 15.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) cyan (c) black (d) magenta
- 16.🌈 In #0000de the blue part is the hex number de. What is it as a normal number?
- 17.🌈 Which colour of light is strongest in rgb(12, 226, 23)? (a) blue (b) green (c) red
- 18.🌈 Which colour of light is strongest in rgb(139, 80, 163)? (a) green (b) red (c) blue
- 19.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) bright green (c) black (d) yellow
- 20.🌈 Which colour of light is strongest in rgb(209, 95, 17)? (a) green (b) blue (c) red
- 21.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) white (c) red (d) magenta
- 22.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) Z (c) G (d) J
- 23.🌈 In #000011 the blue part is the hex number 11. What is it as a normal number?
- 24.🌈 Which colour of light is strongest in rgb(198, 72, 52)? (a) red (b) blue (c) green
- 25.🌈 In #004400 the green part is the hex number 44. What is it as a normal number?
- 26.🌈 Which colour is #ff0000? (a) red (b) cyan (c) black (d) blue
- 27.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 4 (c) 6 (d) 2
- 28.🌈 Which colour of light is strongest in rgb(99, 174, 44)? (a) blue (b) red (c) green
- 29.🌈 Which colour of light is strongest in rgb(220, 104, 32)? (a) blue (b) red (c) green
- 30.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 99 (d) 255
- 31.🌈 Which hex code is magenta? (a) #ffffff (b) #ffff00 (c) #00ff00 (d) #ff00ff
- 32.🌈 In #0000ec the blue part is the hex number ec. What is it as a normal number?
- 33.🌈 In #820000 the red part is the hex number 82. What is it as a normal number?
- 34.🌈 Which colour of light is strongest in rgb(221, 31, 21)? (a) red (b) blue (c) green
- 35.🌈 In #004b00 the green part is the hex number 4b. What is it as a normal number?
- 36.🌈 In #00001a the blue part is the hex number 1a. What is it as a normal number?
- 37.🌈 Which colour of light is strongest in rgb(199, 84, 110)? (a) blue (b) red (c) green
- 38.🌈 In #750000 the red part is the hex number 75. What is it as a normal number?
- 39.🌈 Which colour of light is strongest in rgb(14, 249, 126)? (a) green (b) red (c) blue
- 40.🌈 Which colour of light is strongest in rgb(35, 154, 133)? (a) red (b) green (c) blue
Answer key
- #ffff00
- black
- #00ffff
- white
- red
- bright green
- 247
- cyan
- blue
- blue
- blue
- blue
- magenta
- bright green
- magenta
- 222
- green
- blue
- yellow
- red
- red
- F
- 17
- red
- 68
- red
- 3
- green
- red
- 255
- #ff00ff
- 236
- 130
- red
- 75
- 26
- red
- 117
- green
- green
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids