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(114, 111, 168)? (a) green (b) red (c) blue
- 2.🌈 In #3b0000 the red part is the hex number 3b. What is it as a normal number?
- 3.🌈 Which colour is #ffff00? (a) bright green (b) red (c) magenta (d) yellow
- 4.🌈 Which hex code is cyan? (a) #ffffff (b) #00ffff (c) #00ff00 (d) #ff00ff
- 5.🌈 Which colour is #00ff00? (a) cyan (b) bright green (c) magenta (d) black
- 6.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 1000 (d) 255
- 7.🌈 Which hex code is black? (a) #ff0000 (b) #000000 (c) #ffff00 (d) #00ffff
- 8.🌈 Which colour is #ffffff? (a) bright green (b) white (c) red (d) blue
- 9.🌈 Which colour is #ff0000? (a) yellow (b) bright green (c) red (d) blue
- 10.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) F (d) J
- 11.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 3 (d) 2
- 12.🌈 Which hex code is white? (a) #ffffff (b) #00ff00 (c) #ffff00 (d) #ff00ff
- 13.🌈 Which hex code is red? (a) #0000ff (b) #00ffff (c) #ff0000 (d) #000000
- 14.🌈 Which colour of light is strongest in rgb(133, 19, 189)? (a) red (b) blue (c) green
- 15.🌈 In #4a0000 the red part is the hex number 4a. What is it as a normal number?
- 16.🌈 Which colour is rgb(255, 0, 255)? (a) red (b) blue (c) magenta (d) white
- 17.🌈 In #003600 the green part is the hex number 36. What is it as a normal number?
- 18.🌈 Which colour is #00ffff? (a) white (b) magenta (c) yellow (d) cyan
- 19.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) green (d) white
- 20.🌈 Which colour of light is strongest in rgb(159, 25, 69)? (a) blue (b) red (c) green
- 21.🌈 Which colour of light is strongest in rgb(40, 219, 29)? (a) red (b) blue (c) green
- 22.🌈 Which colour of light is strongest in rgb(25, 114, 240)? (a) green (b) red (c) blue
- 23.🌈 Which hex code is yellow? (a) #ffff00 (b) #000000 (c) #00ffff (d) #ff00ff
- 24.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) red (c) blue (d) black
- 25.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) bright green (c) white (d) magenta
- 26.🌈 In #00000f the blue part is the hex number 0f. What is it as a normal number?
- 27.🌈 Which hex code is blue? (a) #0000ff (b) #000000 (c) #ff00ff (d) #ff0000
- 28.🌈 Which hex code is magenta? (a) #00ff00 (b) #ff00ff (c) #00ffff (d) #0000ff
- 29.🌈 Which colour is #000000? (a) yellow (b) white (c) black (d) magenta
- 30.🌈 Which hex code is bright green? (a) #000000 (b) #00ffff (c) #0000ff (d) #00ff00
- 31.🌈 Which colour is #ff00ff? (a) white (b) bright green (c) magenta (d) red
- 32.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) red (d) blue
- 33.🌈 In #001c00 the green part is the hex number 1c. What is it as a normal number?
- 34.🌈 In #0000f8 the blue part is the hex number f8. What is it as a normal number?
- 35.🌈 Which colour of light is strongest in rgb(209, 111, 100)? (a) blue (b) green (c) red
- 36.🌈 In #0000d2 the blue part is the hex number d2. What is it as a normal number?
- 37.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) magenta (c) yellow (d) white
- 38.🌈 Which colour of light is strongest in rgb(5, 114, 253)? (a) red (b) blue (c) green
- 39.🌈 In #003800 the green part is the hex number 38. What is it as a normal number?
- 40.🌈 Which colour of light is strongest in rgb(246, 106, 0)? (a) green (b) blue (c) red
Answer key
- blue
- 59
- yellow
- #00ffff
- bright green
- 255
- #000000
- white
- red
- F
- 3
- #ffffff
- #ff0000
- blue
- 74
- magenta
- 54
- cyan
- blue
- red
- green
- blue
- #ffff00
- red
- bright green
- 15
- #0000ff
- #ff00ff
- black
- #00ff00
- magenta
- red
- 28
- 248
- red
- 210
- cyan
- blue
- 56
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids