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(29, 97, 158)? (a) red (b) green (c) blue
- 2.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
- 3.🌈 Which colour is #ff00ff? (a) magenta (b) white (c) cyan (d) red
- 4.🌈 Which colour of light is strongest in rgb(186, 93, 21)? (a) blue (b) green (c) red
- 5.🌈 In #6e0000 the red part is the hex number 6e. What is it as a normal number?
- 6.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) white (c) blue (d) yellow
- 7.🌈 Which colour of light is strongest in rgb(33, 183, 61)? (a) red (b) blue (c) green
- 8.🌈 Which hex code is yellow? (a) #00ffff (b) #ffff00 (c) #ff00ff (d) #ff0000
- 9.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) blue (c) red (d) cyan
- 10.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 100 (d) 1000
- 11.🌈 Which hex code is cyan? (a) #00ff00 (b) #ff0000 (c) #ffffff (d) #00ffff
- 12.🌈 Which colour is #00ffff? (a) bright green (b) magenta (c) cyan (d) white
- 13.🌈 In #006c00 the green part is the hex number 6c. What is it as a normal number?
- 14.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) red (d) blue
- 15.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) blue (c) white (d) bright green
- 16.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 4 (d) 2
- 17.🌈 Which colour is #ff0000? (a) white (b) black (c) red (d) magenta
- 18.🌈 Which colour of light is strongest in rgb(6, 136, 167)? (a) green (b) blue (c) red
- 19.🌈 In #000013 the blue part is the hex number 13. What is it as a normal number?
- 20.🌈 Which colour is #0000ff? (a) black (b) blue (c) cyan (d) magenta
- 21.🌈 Which colour of light is strongest in rgb(129, 8, 192)? (a) blue (b) red (c) green
- 22.🌈 Which colour is #000000? (a) red (b) black (c) blue (d) yellow
- 23.🌈 Which colour of light is strongest in rgb(4, 241, 32)? (a) red (b) green (c) blue
- 24.🌈 Which colour of light is strongest in rgb(199, 20, 109)? (a) red (b) green (c) blue
- 25.🌈 Which hex code is black? (a) #000000 (b) #ffffff (c) #0000ff (d) #ff00ff
- 26.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) cyan (c) red (d) yellow
- 27.🌈 In #00009d the blue part is the hex number 9d. What is it as a normal number?
- 28.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) F (d) Z
- 29.🌈 Which colour of light is strongest in rgb(161, 136, 139)? (a) red (b) green (c) blue
- 30.🌈 Which colour is #ffffff? (a) blue (b) black (c) white (d) yellow
- 31.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) yellow (c) bright green (d) red
- 32.🌈 In #003800 the green part is the hex number 38. What is it as a normal number?
- 33.🌈 In #ca0000 the red part is the hex number ca. What is it as a normal number?
- 34.🌈 In #260000 the red part is the hex number 26. What is it as a normal number?
- 35.🌈 In #fb0000 the red part is the hex number fb. What is it as a normal number?
- 36.🌈 Which colour of light is strongest in rgb(139, 220, 103)? (a) red (b) blue (c) green
- 37.🌈 Which colour of light is strongest in rgb(171, 50, 32)? (a) green (b) red (c) blue
- 38.🌈 Which colour of light is strongest in rgb(74, 245, 24)? (a) red (b) green (c) blue
- 39.🌈 Which colour of light is strongest in rgb(40, 76, 202)? (a) red (b) green (c) blue
- 40.🌈 Which hex code is white? (a) #ff0000 (b) #0000ff (c) #ffffff (d) #00ff00
Answer key
- blue
- red
- magenta
- red
- 110
- blue
- green
- #ffff00
- cyan
- 255
- #00ffff
- cyan
- 108
- blue
- magenta
- 3
- red
- blue
- 19
- blue
- blue
- black
- green
- red
- #000000
- yellow
- 157
- F
- red
- white
- red
- 56
- 202
- 38
- 251
- green
- red
- green
- blue
- #ffffff
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids