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.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 255 (d) 99
- 2.🌈 Which hex code is bright green? (a) #000000 (b) #00ff00 (c) #00ffff (d) #ff0000
- 3.🌈 Which colour of light is strongest in rgb(242, 6, 114)? (a) green (b) blue (c) red
- 4.🌈 Which colour of light is strongest in rgb(98, 223, 34)? (a) green (b) blue (c) red
- 5.🌈 Which colour is #000000? (a) black (b) red (c) yellow (d) blue
- 6.🌈 Which hex code is white? (a) #00ff00 (b) #ffffff (c) #ffff00 (d) #0000ff
- 7.🌈 Which colour is #00ff00? (a) blue (b) yellow (c) white (d) bright green
- 8.🌈 Which colour of light is strongest in rgb(22, 70, 175)? (a) red (b) blue (c) green
- 9.🌈 Which hex code is magenta? (a) #ff0000 (b) #ffff00 (c) #ff00ff (d) #000000
- 10.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) black (c) blue (d) white
- 11.🌈 In #000049 the blue part is the hex number 49. What is it as a normal number?
- 12.🌈 In #000076 the blue part is the hex number 76. What is it as a normal number?
- 13.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) green (d) black
- 14.🌈 Which colour is #00ffff? (a) bright green (b) blue (c) cyan (d) red
- 15.🌈 Which colour of light is strongest in rgb(192, 20, 103)? (a) green (b) red (c) blue
- 16.🌈 Which colour of light is strongest in rgb(26, 12, 240)? (a) blue (b) green (c) red
- 17.🌈 Which hex code is black? (a) #ffff00 (b) #ffffff (c) #000000 (d) #ff0000
- 18.🌈 Which colour is #0000ff? (a) bright green (b) white (c) blue (d) magenta
- 19.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) green (d) blue
- 20.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) yellow (c) black (d) red
- 21.🌈 Which hex code is red? (a) #ff0000 (b) #ffff00 (c) #00ffff (d) #ffffff
- 22.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 3 (d) 2
- 23.🌈 In #003100 the green part is the hex number 31. What is it as a normal number?
- 24.🌈 Which hex code is yellow? (a) #00ff00 (b) #ffff00 (c) #ff0000 (d) #ff00ff
- 25.🌈 In #df0000 the red part is the hex number df. What is it as a normal number?
- 26.🌈 In #009300 the green part is the hex number 93. What is it as a normal number?
- 27.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) J (d) F
- 28.🌈 Which hex code is blue? (a) #00ffff (b) #00ff00 (c) #0000ff (d) #ff0000
- 29.🌈 Which colour of light is strongest in rgb(184, 83, 10)? (a) red (b) blue (c) green
- 30.🌈 Which colour is rgb(0, 255, 255)? (a) magenta (b) cyan (c) yellow (d) bright green
- 31.🌈 In #000043 the blue part is the hex number 43. What is it as a normal number?
- 32.🌈 Which colour of light is strongest in rgb(211, 1, 40)? (a) green (b) blue (c) red
- 33.🌈 In #0000c6 the blue part is the hex number c6. What is it as a normal number?
- 34.🌈 Which colour of light is strongest in rgb(219, 140, 134)? (a) green (b) blue (c) red
- 35.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) cyan (c) bright green (d) black
- 36.🌈 Which colour is rgb(255, 0, 0)? (a) white (b) red (c) magenta (d) blue
- 37.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) black (c) blue (d) white
- 38.🌈 Which colour is rgb(255, 0, 255)? (a) cyan (b) white (c) magenta (d) blue
- 39.🌈 Which hex code is cyan? (a) #000000 (b) #0000ff (c) #00ffff (d) #ffffff
- 40.🌈 In #003e00 the green part is the hex number 3e. What is it as a normal number?
Answer key
- 255
- #00ff00
- red
- green
- black
- #ffffff
- bright green
- blue
- #ff00ff
- white
- 73
- 118
- red
- cyan
- red
- blue
- #000000
- blue
- blue
- yellow
- #ff0000
- 3
- 49
- #ffff00
- 223
- 147
- F
- #0000ff
- red
- cyan
- 67
- red
- 198
- red
- bright green
- red
- blue
- magenta
- #00ffff
- 62
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids