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, 0, 255)? (a) black (b) magenta (c) cyan (d) yellow
- 2.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) blue (d) red
- 3.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) bright green (c) cyan (d) black
- 4.🌈 In #270000 the red part is the hex number 27. What is it as a normal number?
- 5.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) bright green (c) black (d) yellow
- 6.🌈 In #220000 the red part is the hex number 22. What is it as a normal number?
- 7.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 255 (c) 1000 (d) 99
- 8.🌈 Which colour of light is strongest in rgb(29, 189, 32)? (a) red (b) blue (c) green
- 9.🌈 Which hex code is black? (a) #ff00ff (b) #000000 (c) #00ff00 (d) #ffff00
- 10.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) blue (c) bright green (d) yellow
- 11.🌈 Which colour is #0000ff? (a) cyan (b) bright green (c) blue (d) black
- 12.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) cyan (c) yellow (d) white
- 13.🌈 Which colour is #ffff00? (a) yellow (b) white (c) black (d) blue
- 14.🌈 Which colour of light is strongest in rgb(24, 37, 176)? (a) red (b) blue (c) green
- 15.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) blue (d) red
- 16.🌈 Which hex code is white? (a) #ffff00 (b) #0000ff (c) #ffffff (d) #ff0000
- 17.🌈 In #0000ee the blue part is the hex number ee. What is it as a normal number?
- 18.🌈 Which colour is #ff0000? (a) blue (b) magenta (c) red (d) bright green
- 19.🌈 Which colour of light is strongest in rgb(182, 41, 65)? (a) red (b) blue (c) green
- 20.🌈 Which colour of light is strongest in rgb(61, 220, 18)? (a) red (b) green (c) blue
- 21.🌈 Which colour is #ffffff? (a) black (b) bright green (c) blue (d) white
- 22.🌈 Which colour of light is strongest in rgb(155, 37, 140)? (a) green (b) red (c) blue
- 23.🌈 Which hex code is bright green? (a) #00ff00 (b) #00ffff (c) #ff0000 (d) #0000ff
- 24.🌈 Which colour of light is strongest in rgb(138, 136, 250)? (a) red (b) blue (c) green
- 25.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 3 (d) 2
- 26.🌈 In #000066 the blue part is the hex number 66. What is it as a normal number?
- 27.🌈 Which colour is rgb(0, 255, 0)? (a) magenta (b) black (c) blue (d) bright green
- 28.🌈 In #250000 the red part is the hex number 25. What is it as a normal number?
- 29.🌈 In #00003b the blue part is the hex number 3b. What is it as a normal number?
- 30.🌈 Which colour of light is strongest in rgb(28, 164, 56)? (a) red (b) blue (c) green
- 31.🌈 In #240000 the red part is the hex number 24. What is it as a normal number?
- 32.🌈 In #f30000 the red part is the hex number f3. What is it as a normal number?
- 33.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) J (c) F (d) Z
- 34.🌈 In #2f0000 the red part is the hex number 2f. What is it as a normal number?
- 35.🌈 Which colour of light is strongest in rgb(217, 60, 51)? (a) blue (b) red (c) green
- 36.🌈 Which hex code is blue? (a) #ffffff (b) #ffff00 (c) #00ffff (d) #0000ff
- 37.🌈 Which hex code is yellow? (a) #ffff00 (b) #000000 (c) #ff00ff (d) #00ffff
- 38.🌈 Which colour of light is strongest in rgb(9, 56, 175)? (a) blue (b) red (c) green
- 39.🌈 Which colour is #ff00ff? (a) red (b) bright green (c) black (d) magenta
- 40.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) white (c) magenta (d) cyan
Answer key
- magenta
- blue
- cyan
- 39
- yellow
- 34
- 255
- green
- #000000
- red
- blue
- black
- yellow
- blue
- red
- #ffffff
- 238
- red
- red
- green
- white
- red
- #00ff00
- blue
- 3
- 102
- bright green
- 37
- 59
- green
- 36
- 243
- F
- 47
- red
- #0000ff
- #ffff00
- blue
- magenta
- blue
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids