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 of light is strongest in rgb(25, 58, 235)? (a) blue (b) green (c) red
- 2.🌈 Which colour is #00ffff? (a) blue (b) red (c) yellow (d) cyan
- 3.🌈 Which colour is rgb(255, 0, 0)? (a) white (b) cyan (c) magenta (d) red
- 4.🌈 Which colour of light is strongest in rgb(61, 171, 47)? (a) green (b) red (c) blue
- 5.🌈 In #000073 the blue part is the hex number 73. What is it as a normal number?
- 6.🌈 Which hex code is yellow? (a) #ff00ff (b) #000000 (c) #0000ff (d) #ffff00
- 7.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 99 (c) 255 (d) 100
- 8.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) F (d) Z
- 9.🌈 Which colour is #0000ff? (a) white (b) yellow (c) bright green (d) blue
- 10.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 2 (d) 3
- 11.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) red (d) blue
- 12.🌈 Which colour is #00ff00? (a) blue (b) bright green (c) white (d) yellow
- 13.🌈 Which colour is rgb(0, 255, 0)? (a) cyan (b) white (c) bright green (d) black
- 14.🌈 Which colour of light is strongest in rgb(203, 129, 63)? (a) red (b) green (c) blue
- 15.🌈 Which colour of light is strongest in rgb(139, 172, 49)? (a) red (b) blue (c) green
- 16.🌈 Which colour of light is strongest in rgb(29, 30, 199)? (a) green (b) red (c) blue
- 17.🌈 In #220000 the red part is the hex number 22. What is it as a normal number?
- 18.🌈 In #d80000 the red part is the hex number d8. What is it as a normal number?
- 19.🌈 Which colour of light is strongest in rgb(253, 79, 95)? (a) green (b) red (c) blue
- 20.🌈 Which hex code is white? (a) #ffffff (b) #00ff00 (c) #000000 (d) #0000ff
- 21.🌈 Which hex code is black? (a) #00ffff (b) #0000ff (c) #000000 (d) #00ff00
- 22.🌈 Which colour of light is strongest in rgb(19, 191, 36)? (a) green (b) blue (c) red
- 23.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) black (c) blue (d) green
- 24.🌈 In #c80000 the red part is the hex number c8. What is it as a normal number?
- 25.🌈 Which hex code is red? (a) #00ff00 (b) #000000 (c) #ff0000 (d) #ffffff
- 26.🌈 Which colour is #ffffff? (a) magenta (b) cyan (c) red (d) white
- 27.🌈 In #b30000 the red part is the hex number b3. What is it as a normal number?
- 28.🌈 Which colour is rgb(0, 0, 0)? (a) magenta (b) bright green (c) black (d) yellow
- 29.🌈 Which colour of light is strongest in rgb(79, 243, 62)? (a) green (b) red (c) blue
- 30.🌈 Which colour is #ff0000? (a) cyan (b) bright green (c) yellow (d) red
- 31.🌈 Which colour is rgb(255, 255, 0)? (a) cyan (b) bright green (c) blue (d) yellow
- 32.🌈 Which colour is #000000? (a) white (b) black (c) yellow (d) magenta
- 33.🌈 In #00e300 the green part is the hex number e3. What is it as a normal number?
- 34.🌈 In #810000 the red part is the hex number 81. What is it as a normal number?
- 35.🌈 Which hex code is cyan? (a) #00ffff (b) #ff00ff (c) #000000 (d) #0000ff
- 36.🌈 Which colour of light is strongest in rgb(85, 95, 153)? (a) green (b) red (c) blue
- 37.🌈 Which colour is #ffff00? (a) cyan (b) magenta (c) blue (d) yellow
- 38.🌈 Which colour of light is strongest in rgb(31, 55, 191)? (a) red (b) green (c) blue
- 39.🌈 Which colour of light is strongest in rgb(127, 59, 223)? (a) blue (b) red (c) green
- 40.🌈 Which colour of light is strongest in rgb(152, 111, 116)? (a) green (b) blue (c) red
Answer key
- blue
- cyan
- red
- green
- 115
- #ffff00
- 255
- F
- blue
- 3
- blue
- bright green
- bright green
- red
- green
- blue
- 34
- 216
- red
- #ffffff
- #000000
- green
- red
- 200
- #ff0000
- white
- 179
- black
- green
- red
- yellow
- black
- 227
- 129
- #00ffff
- blue
- yellow
- blue
- blue
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids