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 bright green? (a) #00ffff (b) #ff00ff (c) #00ff00 (d) #0000ff
- 2.🌈 Which colour is #0000ff? (a) magenta (b) red (c) black (d) blue
- 3.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) black (c) bright green (d) yellow
- 4.🌈 Which colour of light is strongest in rgb(106, 96, 188)? (a) green (b) blue (c) red
- 5.🌈 In #000099 the blue part is the hex number 99. What is it as a normal number?
- 6.🌈 Which colour is #ff0000? (a) red (b) blue (c) bright green (d) white
- 7.🌈 Which colour is #000000? (a) blue (b) magenta (c) black (d) white
- 8.🌈 In #002000 the green part is the hex number 20. What is it as a normal number?
- 9.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 2 (d) 3
- 10.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) F (d) J
- 11.🌈 In #700000 the red part is the hex number 70. What is it as a normal number?
- 12.🌈 In #d70000 the red part is the hex number d7. What is it as a normal number?
- 13.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
- 14.🌈 Which colour of light is strongest in rgb(110, 104, 225)? (a) green (b) blue (c) red
- 15.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) yellow (c) blue (d) white
- 16.🌈 Which colour of light is strongest in rgb(70, 176, 65)? (a) blue (b) green (c) red
- 17.🌈 Which hex code is black? (a) #ff0000 (b) #ff00ff (c) #000000 (d) #ffffff
- 18.🌈 Which hex code is cyan? (a) #ffffff (b) #ffff00 (c) #00ff00 (d) #00ffff
- 19.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) white (c) bright green (d) red
- 20.🌈 Which colour is #00ff00? (a) blue (b) bright green (c) white (d) magenta
- 21.🌈 Which colour of light is strongest in rgb(162, 0, 38)? (a) green (b) blue (c) red
- 22.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) black (c) blue (d) cyan
- 23.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) cyan (c) bright green (d) magenta
- 24.🌈 Which colour is #00ffff? (a) cyan (b) magenta (c) white (d) red
- 25.🌈 Which colour is #ffff00? (a) magenta (b) black (c) cyan (d) yellow
- 26.🌈 Which hex code is red? (a) #ff0000 (b) #00ffff (c) #000000 (d) #ff00ff
- 27.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 1000 (c) 100 (d) 99
- 28.🌈 In #000030 the blue part is the hex number 30. What is it as a normal number?
- 29.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) bright green (c) yellow (d) white
- 30.🌈 In #000046 the blue part is the hex number 46. What is it as a normal number?
- 31.🌈 Which colour of light is strongest in rgb(83, 29, 232)? (a) green (b) blue (c) red
- 32.🌈 Which colour of light is strongest in rgb(104, 93, 242)? (a) green (b) blue (c) red
- 33.🌈 Which hex code is blue? (a) #0000ff (b) #ff00ff (c) #ff0000 (d) #000000
- 34.🌈 Which hex code is white? (a) #ffffff (b) #00ff00 (c) #ff0000 (d) #00ffff
- 35.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) magenta (c) yellow (d) red
- 36.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) yellow (c) black (d) white
- 37.🌈 In #001800 the green part is the hex number 18. What is it as a normal number?
- 38.🌈 Which colour of light is strongest in rgb(28, 225, 92)? (a) blue (b) green (c) red
- 39.🌈 Which hex code is magenta? (a) #000000 (b) #ffffff (c) #ff00ff (d) #0000ff
- 40.🌈 In #560000 the red part is the hex number 56. What is it as a normal number?
Answer key
- #00ff00
- blue
- cyan
- blue
- 153
- red
- black
- 32
- 3
- F
- 112
- 215
- red
- blue
- red
- green
- #000000
- #00ffff
- black
- bright green
- red
- bright green
- magenta
- cyan
- yellow
- #ff0000
- 255
- 48
- white
- 70
- blue
- blue
- #0000ff
- #ffffff
- blue
- yellow
- 24
- green
- #ff00ff
- 86
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids