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 #000033 the blue part is the hex number 33. What is it as a normal number?
- 2.🌈 Which colour of light is strongest in rgb(27, 183, 36)? (a) red (b) blue (c) green
- 3.🌈 Which colour of light is strongest in rgb(190, 114, 52)? (a) green (b) red (c) blue
- 4.🌈 Which colour of light is strongest in rgb(221, 127, 36)? (a) green (b) blue (c) red
- 5.🌈 Which hex code is red? (a) #00ff00 (b) #ffff00 (c) #ff0000 (d) #0000ff
- 6.🌈 Which hex code is blue? (a) #00ff00 (b) #00ffff (c) #ff00ff (d) #0000ff
- 7.🌈 In #000017 the blue part is the hex number 17. What is it as a normal number?
- 8.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) G (d) F
- 9.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 6 (d) 2
- 10.🌈 Which colour is #00ff00? (a) yellow (b) white (c) black (d) bright green
- 11.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) bright green (c) red (d) cyan
- 12.🌈 Which colour of light is strongest in rgb(239, 108, 115)? (a) green (b) red (c) blue
- 13.🌈 Which colour of light is strongest in rgb(22, 133, 187)? (a) red (b) blue (c) green
- 14.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) bright green (c) yellow (d) black
- 15.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) blue (c) white (d) black
- 16.🌈 Which hex code is bright green? (a) #00ff00 (b) #0000ff (c) #00ffff (d) #ff00ff
- 17.🌈 Which colour of light is strongest in rgb(25, 208, 18)? (a) blue (b) green (c) red
- 18.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) blue (c) magenta (d) yellow
- 19.🌈 Which colour of light is strongest in rgb(97, 195, 40)? (a) red (b) green (c) blue
- 20.🌈 In #000003 the blue part is the hex number 03. What is it as a normal number?
- 21.🌈 Which colour is #ffff00? (a) magenta (b) red (c) yellow (d) blue
- 22.🌈 Which hex code is magenta? (a) #ff00ff (b) #ffffff (c) #ff0000 (d) #000000
- 23.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) black (d) green
- 24.🌈 Which hex code is white? (a) #00ff00 (b) #ffffff (c) #ff0000 (d) #00ffff
- 25.🌈 Which colour of light is strongest in rgb(232, 32, 55)? (a) red (b) green (c) blue
- 26.🌈 Which colour is #000000? (a) bright green (b) cyan (c) red (d) black
- 27.🌈 In #620000 the red part is the hex number 62. What is it as a normal number?
- 28.🌈 In #008400 the green part is the hex number 84. What is it as a normal number?
- 29.🌈 Which colour of light is strongest in rgb(76, 158, 92)? (a) green (b) red (c) blue
- 30.🌈 Which colour of light is strongest in rgb(167, 56, 123)? (a) blue (b) red (c) green
- 31.🌈 In #bc0000 the red part is the hex number bc. What is it as a normal number?
- 32.🌈 In #006900 the green part is the hex number 69. What is it as a normal number?
- 33.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) white (c) blue (d) green
- 34.🌈 Which colour of light is strongest in rgb(51, 99, 229)? (a) red (b) green (c) blue
- 35.🌈 Which colour is #ff00ff? (a) magenta (b) yellow (c) white (d) red
- 36.🌈 Which colour of light is strongest in rgb(8, 224, 35)? (a) green (b) blue (c) red
- 37.🌈 In #0000c2 the blue part is the hex number c2. What is it as a normal number?
- 38.🌈 In #00b200 the green part is the hex number b2. What is it as a normal number?
- 39.🌈 In #0000c0 the blue part is the hex number c0. What is it as a normal number?
- 40.🌈 Which colour of light is strongest in rgb(1, 242, 29)? (a) green (b) red (c) blue
Answer key
- 51
- green
- red
- red
- #ff0000
- #0000ff
- 23
- F
- 3
- bright green
- bright green
- red
- blue
- white
- red
- #00ff00
- green
- yellow
- green
- 3
- yellow
- #ff00ff
- red
- #ffffff
- red
- black
- 98
- 132
- green
- red
- 188
- 105
- blue
- blue
- magenta
- green
- 194
- 178
- 192
- green
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids