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 hex code is red? (a) #0000ff (b) #00ffff (c) #ff00ff (d) #ff0000
- 2.🌈 Which colour of light is strongest in rgb(121, 67, 170)? (a) blue (b) red (c) green
- 3.🌈 Which colour is #ffffff? (a) cyan (b) yellow (c) blue (d) white
- 4.🌈 Which colour of light is strongest in rgb(237, 24, 69)? (a) green (b) red (c) blue
- 5.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) white (d) blue
- 6.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) cyan (c) bright green (d) yellow
- 7.🌈 In #360000 the red part is the hex number 36. What is it as a normal number?
- 8.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) cyan (c) bright green (d) magenta
- 9.🌈 Which colour is rgb(0, 255, 255)? (a) magenta (b) blue (c) bright green (d) cyan
- 10.🌈 Which colour of light is strongest in rgb(166, 33, 7)? (a) blue (b) green (c) red
- 11.🌈 Which colour of light is strongest in rgb(210, 46, 135)? (a) green (b) blue (c) red
- 12.🌈 In #0000cf the blue part is the hex number cf. What is it as a normal number?
- 13.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) magenta (c) red (d) white
- 14.🌈 In #000080 the blue part is the hex number 80. What is it as a normal number?
- 15.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) black (c) blue (d) green
- 16.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) J (c) F (d) Z
- 17.🌈 Which colour of light is strongest in rgb(28, 216, 12)? (a) red (b) green (c) blue
- 18.🌈 Which colour of light is strongest in rgb(150, 52, 127)? (a) green (b) red (c) blue
- 19.🌈 Which colour of light is strongest in rgb(131, 46, 224)? (a) red (b) green (c) blue
- 20.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) cyan (c) black (d) red
- 21.🌈 Which colour is #00ffff? (a) cyan (b) red (c) bright green (d) magenta
- 22.🌈 Which colour of light is strongest in rgb(31, 185, 12)? (a) blue (b) red (c) green
- 23.🌈 Which hex code is bright green? (a) #00ff00 (b) #ffffff (c) #ff0000 (d) #ff00ff
- 24.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 4 (d) 6
- 25.🌈 In #000050 the blue part is the hex number 50. What is it as a normal number?
- 26.🌈 In #100000 the red part is the hex number 10. What is it as a normal number?
- 27.🌈 In #000003 the blue part is the hex number 03. What is it as a normal number?
- 28.🌈 Which colour of light is strongest in rgb(56, 59, 206)? (a) red (b) green (c) blue
- 29.🌈 Which colour is #000000? (a) bright green (b) yellow (c) black (d) blue
- 30.🌈 In #002800 the green part is the hex number 28. What is it as a normal number?
- 31.🌈 In #000049 the blue part is the hex number 49. What is it as a normal number?
- 32.🌈 Which colour is rgb(255, 0, 0)? (a) magenta (b) red (c) black (d) yellow
- 33.🌈 Which colour of light is strongest in rgb(65, 99, 157)? (a) blue (b) red (c) green
- 34.🌈 In #0000ac the blue part is the hex number ac. What is it as a normal number?
- 35.🌈 Which colour of light is strongest in rgb(29, 14, 169)? (a) red (b) green (c) blue
- 36.🌈 Which colour of light is strongest in rgb(88, 210, 33)? (a) red (b) green (c) blue
- 37.🌈 Which colour is #0000ff? (a) red (b) blue (c) yellow (d) bright green
- 38.🌈 In #5d0000 the red part is the hex number 5d. What is it as a normal number?
- 39.🌈 Which colour is rgb(255, 255, 0)? (a) black (b) magenta (c) yellow (d) bright green
- 40.🌈 Which colour is #ff0000? (a) black (b) magenta (c) white (d) red
Answer key
- #ff0000
- blue
- white
- red
- blue
- bright green
- 54
- white
- cyan
- red
- red
- 207
- magenta
- 128
- red
- F
- green
- red
- blue
- black
- cyan
- green
- #00ff00
- 3
- 80
- 16
- 3
- blue
- black
- 40
- 73
- red
- blue
- 172
- blue
- green
- blue
- 93
- yellow
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids