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.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 4 (d) 2
- 2.🌈 Which hex code is cyan? (a) #0000ff (b) #00ffff (c) #000000 (d) #00ff00
- 3.🌈 Which hex code is bright green? (a) #000000 (b) #ffffff (c) #ff0000 (d) #00ff00
- 4.🌈 Which colour of light is strongest in rgb(19, 197, 110)? (a) red (b) blue (c) green
- 5.🌈 Which colour of light is strongest in rgb(96, 225, 69)? (a) red (b) green (c) blue
- 6.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) white (c) red (d) green
- 7.🌈 Which colour of light is strongest in rgb(34, 29, 171)? (a) red (b) blue (c) green
- 8.🌈 Which colour is rgb(0, 255, 0)? (a) magenta (b) bright green (c) white (d) red
- 9.🌈 Which colour is #ffff00? (a) blue (b) yellow (c) white (d) magenta
- 10.🌈 In #410000 the red part is the hex number 41. What is it as a normal number?
- 11.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) black (d) green
- 12.🌈 In #300000 the red part is the hex number 30. What is it as a normal number?
- 13.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) Z (d) J
- 14.🌈 Which colour of light is strongest in rgb(27, 137, 235)? (a) green (b) red (c) blue
- 15.🌈 Which colour of light is strongest in rgb(213, 42, 87)? (a) green (b) red (c) blue
- 16.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) bright green (c) cyan (d) black
- 17.🌈 Which colour is #ff0000? (a) red (b) white (c) bright green (d) black
- 18.🌈 Which colour of light is strongest in rgb(223, 9, 129)? (a) red (b) blue (c) green
- 19.🌈 In #0000ab the blue part is the hex number ab. What is it as a normal number?
- 20.🌈 Which colour of light is strongest in rgb(76, 96, 173)? (a) red (b) green (c) blue
- 21.🌈 Which colour is rgb(255, 0, 255)? (a) blue (b) magenta (c) cyan (d) bright green
- 22.🌈 Which hex code is yellow? (a) #00ff00 (b) #0000ff (c) #ff0000 (d) #ffff00
- 23.🌈 Which colour of light is strongest in rgb(19, 150, 135)? (a) blue (b) green (c) red
- 24.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 255 (c) 99 (d) 1000
- 25.🌈 Which hex code is red? (a) #ff0000 (b) #0000ff (c) #00ffff (d) #00ff00
- 26.🌈 Which colour of light is strongest in rgb(188, 91, 114)? (a) blue (b) green (c) red
- 27.🌈 Which colour is #ffffff? (a) white (b) red (c) yellow (d) cyan
- 28.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) black (c) magenta (d) yellow
- 29.🌈 Which colour is #00ffff? (a) cyan (b) red (c) magenta (d) black
- 30.🌈 Which colour is #0000ff? (a) black (b) blue (c) red (d) magenta
- 31.🌈 Which colour of light is strongest in rgb(174, 121, 103)? (a) blue (b) red (c) green
- 32.🌈 Which hex code is white? (a) #ffffff (b) #ff0000 (c) #ff00ff (d) #00ffff
- 33.🌈 Which colour is rgb(255, 0, 0)? (a) magenta (b) black (c) blue (d) red
- 34.🌈 Which colour of light is strongest in rgb(74, 113, 174)? (a) blue (b) green (c) red
- 35.🌈 In #0000e7 the blue part is the hex number e7. What is it as a normal number?
- 36.🌈 Which hex code is black? (a) #00ff00 (b) #00ffff (c) #000000 (d) #ff00ff
- 37.🌈 Which hex code is blue? (a) #00ff00 (b) #00ffff (c) #0000ff (d) #ff0000
- 38.🌈 In #000007 the blue part is the hex number 07. What is it as a normal number?
- 39.🌈 Which colour of light is strongest in rgb(31, 58, 158)? (a) blue (b) green (c) red
- 40.🌈 In #00cb00 the green part is the hex number cb. What is it as a normal number?
Answer key
- 3
- #00ffff
- #00ff00
- green
- green
- blue
- blue
- bright green
- yellow
- 65
- red
- 48
- F
- blue
- red
- black
- red
- red
- 171
- blue
- magenta
- #ffff00
- green
- 255
- #ff0000
- red
- white
- blue
- cyan
- blue
- red
- #ffffff
- red
- blue
- 231
- #000000
- #0000ff
- 7
- blue
- 203
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids