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(255, 0, 0)? (a) bright green (b) red (c) cyan (d) magenta
- 2.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 99 (c) 1000 (d) 100
- 3.🌈 Which hex code is white? (a) #ffff00 (b) #ffffff (c) #00ff00 (d) #0000ff
- 4.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) blue (d) white
- 5.🌈 Which hex code is bright green? (a) #0000ff (b) #00ff00 (c) #ff0000 (d) #000000
- 6.🌈 Which colour is #00ff00? (a) bright green (b) magenta (c) red (d) white
- 7.🌈 Which colour of light is strongest in rgb(77, 4, 191)? (a) blue (b) green (c) red
- 8.🌈 Which colour is #ffffff? (a) white (b) blue (c) red (d) magenta
- 9.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) green (c) black (d) blue
- 10.🌈 In #000017 the blue part is the hex number 17. What is it as a normal number?
- 11.🌈 In #0000cd the blue part is the hex number cd. What is it as a normal number?
- 12.🌈 Which colour of light is strongest in rgb(188, 129, 42)? (a) red (b) blue (c) green
- 13.🌈 Which hex code is magenta? (a) #ff0000 (b) #ff00ff (c) #00ff00 (d) #000000
- 14.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) F (d) Z
- 15.🌈 Which colour of light is strongest in rgb(216, 140, 59)? (a) red (b) blue (c) green
- 16.🌈 Which colour is #ff00ff? (a) magenta (b) black (c) white (d) bright green
- 17.🌈 Which colour of light is strongest in rgb(168, 90, 15)? (a) green (b) blue (c) red
- 18.🌈 Which colour of light is strongest in rgb(195, 128, 19)? (a) green (b) blue (c) red
- 19.🌈 In #340000 the red part is the hex number 34. What is it as a normal number?
- 20.🌈 In #270000 the red part is the hex number 27. What is it as a normal number?
- 21.🌈 In #000002 the blue part is the hex number 02. What is it as a normal number?
- 22.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) black (c) magenta (d) yellow
- 23.🌈 Which colour of light is strongest in rgb(172, 66, 38)? (a) green (b) red (c) blue
- 24.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) red (c) black (d) yellow
- 25.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) black (c) white (d) cyan
- 26.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) yellow (c) blue (d) black
- 27.🌈 Which colour of light is strongest in rgb(100, 204, 7)? (a) green (b) blue (c) red
- 28.🌈 Which colour of light is strongest in rgb(156, 20, 88)? (a) green (b) blue (c) red
- 29.🌈 Which colour of light is strongest in rgb(85, 111, 208)? (a) green (b) red (c) blue
- 30.🌈 Which colour of light is strongest in rgb(97, 78, 206)? (a) red (b) green (c) blue
- 31.🌈 Which colour is #000000? (a) bright green (b) black (c) white (d) red
- 32.🌈 Which colour is #ff0000? (a) black (b) blue (c) bright green (d) red
- 33.🌈 Which colour is #00ffff? (a) white (b) cyan (c) bright green (d) blue
- 34.🌈 Which colour of light is strongest in rgb(168, 90, 14)? (a) blue (b) green (c) red
- 35.🌈 Which colour is #ffff00? (a) yellow (b) blue (c) bright green (d) black
- 36.🌈 Which hex code is black? (a) #000000 (b) #00ffff (c) #ffff00 (d) #ff0000
- 37.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 6 (c) 3 (d) 4
- 38.🌈 In #006200 the green part is the hex number 62. What is it as a normal number?
- 39.🌈 Which hex code is red? (a) #0000ff (b) #00ffff (c) #000000 (d) #ff0000
- 40.🌈 In #000021 the blue part is the hex number 21. What is it as a normal number?
Answer key
- red
- 255
- #ffffff
- blue
- #00ff00
- bright green
- blue
- white
- red
- 23
- 205
- red
- #ff00ff
- F
- red
- magenta
- red
- red
- 52
- 39
- 2
- yellow
- red
- bright green
- magenta
- blue
- green
- red
- blue
- blue
- black
- red
- cyan
- red
- yellow
- #000000
- 3
- 98
- #ff0000
- 33
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids