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, 0, 255)? (a) white (b) red (c) blue (d) bright green
- 2.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) white (c) black (d) magenta
- 3.🌈 In #370000 the red part is the hex number 37. What is it as a normal number?
- 4.🌈 In #c60000 the red part is the hex number c6. What is it as a normal number?
- 5.🌈 Which colour is #00ff00? (a) bright green (b) black (c) red (d) yellow
- 6.🌈 Which colour of light is strongest in rgb(207, 103, 5)? (a) green (b) red (c) blue
- 7.🌈 Which colour is #00ffff? (a) red (b) magenta (c) blue (d) cyan
- 8.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) red (d) blue
- 9.🌈 Which colour of light is strongest in rgb(201, 130, 5)? (a) blue (b) red (c) green
- 10.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 2 (c) 3 (d) 4
- 11.🌈 In #000000 the blue part is the hex number 00. What is it as a normal number?
- 12.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 1000 (c) 100 (d) 255
- 13.🌈 Which colour is #0000ff? (a) black (b) bright green (c) blue (d) white
- 14.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) white (c) bright green (d) black
- 15.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) J (d) F
- 16.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) white (d) green
- 17.🌈 Which colour is rgb(255, 255, 255)? (a) bright green (b) white (c) cyan (d) yellow
- 18.🌈 Which hex code is yellow? (a) #000000 (b) #ff00ff (c) #ffff00 (d) #ffffff
- 19.🌈 In #e80000 the red part is the hex number e8. What is it as a normal number?
- 20.🌈 Which colour is #ff00ff? (a) bright green (b) blue (c) cyan (d) magenta
- 21.🌈 Which colour of light is strongest in rgb(211, 75, 6)? (a) blue (b) red (c) green
- 22.🌈 Which colour of light is strongest in rgb(29, 168, 16)? (a) green (b) blue (c) red
- 23.🌈 Which colour of light is strongest in rgb(166, 29, 92)? (a) red (b) green (c) blue
- 24.🌈 In #002700 the green part is the hex number 27. What is it as a normal number?
- 25.🌈 In #0000eb the blue part is the hex number eb. What is it as a normal number?
- 26.🌈 In #0000d6 the blue part is the hex number d6. What is it as a normal number?
- 27.🌈 In #750000 the red part is the hex number 75. What is it as a normal number?
- 28.🌈 Which colour is #ff0000? (a) white (b) red (c) black (d) magenta
- 29.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) bright green (c) magenta (d) yellow
- 30.🌈 Which hex code is red? (a) #00ffff (b) #ffff00 (c) #ff0000 (d) #ff00ff
- 31.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) magenta (c) red (d) blue
- 32.🌈 In #000046 the blue part is the hex number 46. What is it as a normal number?
- 33.🌈 Which colour of light is strongest in rgb(71, 239, 107)? (a) blue (b) red (c) green
- 34.🌈 In #3b0000 the red part is the hex number 3b. What is it as a normal number?
- 35.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) cyan (c) bright green (d) red
- 36.🌈 In #e30000 the red part is the hex number e3. What is it as a normal number?
- 37.🌈 In #004d00 the green part is the hex number 4d. What is it as a normal number?
- 38.🌈 Which hex code is cyan? (a) #ffff00 (b) #ffffff (c) #ff00ff (d) #00ffff
- 39.🌈 Which colour is #ffff00? (a) blue (b) yellow (c) black (d) red
- 40.🌈 Which colour is #ffffff? (a) yellow (b) red (c) blue (d) white
Answer key
- blue
- black
- 55
- 198
- bright green
- red
- cyan
- red
- red
- 3
- 0
- 255
- blue
- bright green
- F
- blue
- white
- #ffff00
- 232
- magenta
- red
- green
- red
- 39
- 235
- 214
- 117
- red
- yellow
- #ff0000
- magenta
- 70
- green
- 59
- red
- 227
- 77
- #00ffff
- yellow
- white
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids