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 is rgb(0, 255, 0)? (a) yellow (b) cyan (c) white (d) bright green
- 2.🌈 Which colour is #ff00ff? (a) white (b) yellow (c) magenta (d) red
- 3.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) J (d) F
- 4.🌈 In #00004d the blue part is the hex number 4d. What is it as a normal number?
- 5.🌈 In #0000f9 the blue part is the hex number f9. What is it as a normal number?
- 6.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) blue (d) black
- 7.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) blue (d) green
- 8.🌈 Which colour of light is strongest in rgb(40, 104, 151)? (a) blue (b) green (c) red
- 9.🌈 Which hex code is bright green? (a) #0000ff (b) #000000 (c) #00ff00 (d) #ff00ff
- 10.🌈 Which colour of light is strongest in rgb(76, 202, 106)? (a) green (b) blue (c) red
- 11.🌈 Which hex code is black? (a) #ffffff (b) #000000 (c) #ff0000 (d) #00ff00
- 12.🌈 Which colour of light is strongest in rgb(50, 83, 223)? (a) green (b) red (c) blue
- 13.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 99 (d) 255
- 14.🌈 Which hex code is yellow? (a) #00ffff (b) #000000 (c) #ffff00 (d) #00ff00
- 15.🌈 Which hex code is magenta? (a) #0000ff (b) #ffffff (c) #ff00ff (d) #ffff00
- 16.🌈 Which colour is rgb(0, 0, 0)? (a) magenta (b) cyan (c) black (d) yellow
- 17.🌈 Which colour of light is strongest in rgb(207, 27, 66)? (a) red (b) blue (c) green
- 18.🌈 Which colour of light is strongest in rgb(190, 0, 76)? (a) green (b) blue (c) red
- 19.🌈 Which colour of light is strongest in rgb(53, 81, 246)? (a) green (b) red (c) blue
- 20.🌈 In #420000 the red part is the hex number 42. What is it as a normal number?
- 21.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 6 (c) 3 (d) 4
- 22.🌈 Which colour of light is strongest in rgb(118, 98, 190)? (a) green (b) red (c) blue
- 23.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) white (c) bright green (d) red
- 24.🌈 Which colour of light is strongest in rgb(183, 111, 95)? (a) blue (b) green (c) red
- 25.🌈 Which colour is rgb(0, 0, 255)? (a) white (b) blue (c) yellow (d) bright green
- 26.🌈 Which hex code is blue? (a) #000000 (b) #0000ff (c) #00ff00 (d) #ffff00
- 27.🌈 Which colour is #00ffff? (a) bright green (b) white (c) cyan (d) black
- 28.🌈 In #00000e the blue part is the hex number 0e. What is it as a normal number?
- 29.🌈 Which colour is rgb(255, 0, 255)? (a) red (b) blue (c) magenta (d) bright green
- 30.🌈 In #110000 the red part is the hex number 11. What is it as a normal number?
- 31.🌈 In #000065 the blue part is the hex number 65. What is it as a normal number?
- 32.🌈 Which colour is #00ff00? (a) bright green (b) blue (c) white (d) yellow
- 33.🌈 Which colour is #ff0000? (a) cyan (b) red (c) blue (d) bright green
- 34.🌈 Which colour is #0000ff? (a) blue (b) yellow (c) cyan (d) magenta
- 35.🌈 Which hex code is red? (a) #ffff00 (b) #ff0000 (c) #0000ff (d) #000000
- 36.🌈 Which colour of light is strongest in rgb(162, 72, 44)? (a) blue (b) red (c) green
- 37.🌈 In #b50000 the red part is the hex number b5. What is it as a normal number?
- 38.🌈 In #780000 the red part is the hex number 78. What is it as a normal number?
- 39.🌈 Which colour of light is strongest in rgb(162, 60, 128)? (a) green (b) blue (c) red
- 40.🌈 Which colour of light is strongest in rgb(195, 18, 41)? (a) green (b) red (c) blue
Answer key
- bright green
- magenta
- F
- 77
- 249
- red
- blue
- blue
- #00ff00
- green
- #000000
- blue
- 255
- #ffff00
- #ff00ff
- black
- red
- red
- blue
- 66
- 3
- blue
- white
- red
- blue
- #0000ff
- cyan
- 14
- magenta
- 17
- 101
- bright green
- red
- blue
- #ff0000
- red
- 181
- 120
- red
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids