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) yellow (b) blue (c) cyan (d) magenta
- 2.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) blue (d) green
- 3.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) Z (c) J (d) G
- 4.🌈 Which hex code is white? (a) #00ff00 (b) #0000ff (c) #ffffff (d) #000000
- 5.🌈 Which colour is #000000? (a) red (b) black (c) yellow (d) white
- 6.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) red (d) black
- 7.🌈 Which colour is #00ffff? (a) magenta (b) black (c) red (d) cyan
- 8.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 99 (d) 255
- 9.🌈 Which colour of light is strongest in rgb(94, 63, 217)? (a) green (b) blue (c) red
- 10.🌈 Which colour of light is strongest in rgb(139, 181, 52)? (a) green (b) blue (c) red
- 11.🌈 Which hex code is red? (a) #ffff00 (b) #0000ff (c) #000000 (d) #ff0000
- 12.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 3 (d) 6
- 13.🌈 In #f80000 the red part is the hex number f8. What is it as a normal number?
- 14.🌈 Which hex code is magenta? (a) #00ffff (b) #ff00ff (c) #ffff00 (d) #ffffff
- 15.🌈 Which hex code is black? (a) #00ff00 (b) #000000 (c) #0000ff (d) #00ffff
- 16.🌈 In #110000 the red part is the hex number 11. What is it as a normal number?
- 17.🌈 In #00d200 the green part is the hex number d2. What is it as a normal number?
- 18.🌈 Which hex code is cyan? (a) #000000 (b) #ff0000 (c) #ff00ff (d) #00ffff
- 19.🌈 In #4b0000 the red part is the hex number 4b. What is it as a normal number?
- 20.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) bright green (c) blue (d) black
- 21.🌈 Which colour is rgb(0, 0, 255)? (a) white (b) magenta (c) blue (d) red
- 22.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) white (c) black (d) bright green
- 23.🌈 Which colour of light is strongest in rgb(194, 138, 115)? (a) blue (b) green (c) red
- 24.🌈 Which colour is #ff0000? (a) blue (b) black (c) red (d) cyan
- 25.🌈 Which hex code is bright green? (a) #00ff00 (b) #ff00ff (c) #ffff00 (d) #ff0000
- 26.🌈 Which colour is #ffffff? (a) magenta (b) white (c) blue (d) bright green
- 27.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) yellow (c) white (d) red
- 28.🌈 Which colour is #00ff00? (a) black (b) bright green (c) magenta (d) blue
- 29.🌈 Which hex code is yellow? (a) #00ff00 (b) #ffff00 (c) #ffffff (d) #ff0000
- 30.🌈 Which colour of light is strongest in rgb(160, 99, 28)? (a) blue (b) red (c) green
- 31.🌈 Which colour of light is strongest in rgb(84, 217, 56)? (a) red (b) green (c) blue
- 32.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) cyan (c) white (d) yellow
- 33.🌈 Which colour of light is strongest in rgb(123, 226, 132)? (a) red (b) blue (c) green
- 34.🌈 Which colour of light is strongest in rgb(96, 178, 61)? (a) red (b) green (c) blue
- 35.🌈 Which colour of light is strongest in rgb(252, 87, 118)? (a) blue (b) red (c) green
- 36.🌈 Which colour is #ff00ff? (a) black (b) white (c) magenta (d) bright green
- 37.🌈 Which colour is #0000ff? (a) blue (b) magenta (c) cyan (d) yellow
- 38.🌈 In #000016 the blue part is the hex number 16. What is it as a normal number?
- 39.🌈 In #510000 the red part is the hex number 51. What is it as a normal number?
- 40.🌈 In #0000b4 the blue part is the hex number b4. What is it as a normal number?
Answer key
- yellow
- blue
- F
- #ffffff
- black
- red
- cyan
- 255
- blue
- green
- #ff0000
- 3
- 248
- #ff00ff
- #000000
- 17
- 210
- #00ffff
- 75
- black
- blue
- bright green
- red
- red
- #00ff00
- white
- red
- bright green
- #ffff00
- red
- green
- cyan
- green
- green
- red
- magenta
- blue
- 22
- 81
- 180
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids