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, 255, 0)? (a) white (b) blue (c) cyan (d) yellow
- 2.🌈 Which hex code is yellow? (a) #ff0000 (b) #ffff00 (c) #00ff00 (d) #000000
- 3.🌈 Which colour is #ff00ff? (a) white (b) red (c) magenta (d) yellow
- 4.🌈 Which hex code is magenta? (a) #ffff00 (b) #000000 (c) #ff00ff (d) #00ffff
- 5.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) green (c) black (d) blue
- 6.🌈 Which hex code is red? (a) #ffffff (b) #000000 (c) #ff0000 (d) #00ff00
- 7.🌈 Which colour is #00ff00? (a) yellow (b) bright green (c) cyan (d) white
- 8.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) black (c) red (d) blue
- 9.🌈 Which colour of light is strongest in rgb(226, 86, 25)? (a) green (b) red (c) blue
- 10.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 1000 (d) 255
- 11.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) Z (c) G (d) J
- 12.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) magenta (c) bright green (d) cyan
- 13.🌈 In #00bf00 the green part is the hex number bf. What is it as a normal number?
- 14.🌈 Which colour of light is strongest in rgb(116, 186, 81)? (a) blue (b) red (c) green
- 15.🌈 In #8a0000 the red part is the hex number 8a. What is it as a normal number?
- 16.🌈 Which hex code is cyan? (a) #ffffff (b) #ff0000 (c) #0000ff (d) #00ffff
- 17.🌈 Which hex code is white? (a) #ffff00 (b) #ffffff (c) #0000ff (d) #00ffff
- 18.🌈 In #da0000 the red part is the hex number da. What is it as a normal number?
- 19.🌈 Which hex code is bright green? (a) #ffff00 (b) #000000 (c) #00ff00 (d) #ff00ff
- 20.🌈 In #270000 the red part is the hex number 27. What is it as a normal number?
- 21.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) white (c) blue (d) green
- 22.🌈 Which colour is #ffff00? (a) black (b) red (c) yellow (d) cyan
- 23.🌈 Which colour is #0000ff? (a) white (b) cyan (c) bright green (d) blue
- 24.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) white (c) blue (d) magenta
- 25.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) blue (c) white (d) black
- 26.🌈 Which colour is #00ffff? (a) blue (b) bright green (c) red (d) cyan
- 27.🌈 Which colour is #ffffff? (a) bright green (b) cyan (c) white (d) blue
- 28.🌈 Which colour is #000000? (a) black (b) magenta (c) cyan (d) white
- 29.🌈 In #006b00 the green part is the hex number 6b. What is it as a normal number?
- 30.🌈 Which colour of light is strongest in rgb(64, 242, 56)? (a) red (b) blue (c) green
- 31.🌈 Which colour of light is strongest in rgb(72, 58, 252)? (a) green (b) red (c) blue
- 32.🌈 Which colour of light is strongest in rgb(48, 70, 191)? (a) red (b) blue (c) green
- 33.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) black (c) bright green (d) white
- 34.🌈 Which colour of light is strongest in rgb(140, 230, 133)? (a) blue (b) red (c) green
- 35.🌈 Which colour of light is strongest in rgb(153, 61, 39)? (a) green (b) blue (c) red
- 36.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 4 (d) 2
- 37.🌈 In #0000f2 the blue part is the hex number f2. What is it as a normal number?
- 38.🌈 Which colour is #ff0000? (a) bright green (b) red (c) magenta (d) yellow
- 39.🌈 In #060000 the red part is the hex number 06. What is it as a normal number?
- 40.🌈 Which colour of light is strongest in rgb(122, 83, 240)? (a) blue (b) green (c) red
Answer key
- yellow
- #ffff00
- magenta
- #ff00ff
- red
- #ff0000
- bright green
- red
- red
- 255
- F
- bright green
- 191
- green
- 138
- #00ffff
- #ffffff
- 218
- #00ff00
- 39
- blue
- yellow
- blue
- white
- blue
- cyan
- white
- black
- 107
- green
- blue
- blue
- black
- green
- red
- 3
- 242
- red
- 6
- blue
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids