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 magenta? (a) #0000ff (b) #ff00ff (c) #ffffff (d) #00ffff
- 2.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) white (c) bright green (d) cyan
- 3.🌈 In #120000 the red part is the hex number 12. What is it as a normal number?
- 4.🌈 Which hex code is white? (a) #ff0000 (b) #ffffff (c) #00ffff (d) #0000ff
- 5.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) red (c) yellow (d) magenta
- 6.🌈 Which hex code is blue? (a) #00ff00 (b) #ffff00 (c) #00ffff (d) #0000ff
- 7.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) black (d) red
- 8.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) green (d) white
- 9.🌈 Which colour of light is strongest in rgb(192, 80, 101)? (a) green (b) blue (c) red
- 10.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 99 (c) 1000 (d) 100
- 11.🌈 In #003b00 the green part is the hex number 3b. What is it as a normal number?
- 12.🌈 Which colour of light is strongest in rgb(158, 32, 2)? (a) green (b) blue (c) red
- 13.🌈 Which colour of light is strongest in rgb(178, 132, 35)? (a) blue (b) red (c) green
- 14.🌈 Which colour of light is strongest in rgb(120, 233, 63)? (a) red (b) green (c) blue
- 15.🌈 In #080000 the red part is the hex number 08. What is it as a normal number?
- 16.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 2 (d) 4
- 17.🌈 Which colour is #0000ff? (a) yellow (b) blue (c) white (d) magenta
- 18.🌈 Which colour of light is strongest in rgb(241, 118, 77)? (a) red (b) green (c) blue
- 19.🌈 Which hex code is cyan? (a) #00ffff (b) #00ff00 (c) #0000ff (d) #ffffff
- 20.🌈 Which colour of light is strongest in rgb(193, 66, 33)? (a) green (b) red (c) blue
- 21.🌈 Which colour is #ff00ff? (a) cyan (b) red (c) yellow (d) magenta
- 22.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) Z (d) J
- 23.🌈 Which hex code is black? (a) #00ffff (b) #ffff00 (c) #000000 (d) #ff0000
- 24.🌈 Which colour is #00ff00? (a) white (b) blue (c) black (d) bright green
- 25.🌈 Which colour of light is strongest in rgb(208, 138, 61)? (a) blue (b) green (c) red
- 26.🌈 Which colour of light is strongest in rgb(25, 33, 187)? (a) blue (b) green (c) red
- 27.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) cyan (c) magenta (d) bright green
- 28.🌈 Which colour of light is strongest in rgb(110, 199, 27)? (a) red (b) green (c) blue
- 29.🌈 In #d10000 the red part is the hex number d1. What is it as a normal number?
- 30.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) white (c) red (d) yellow
- 31.🌈 In #00005c the blue part is the hex number 5c. What is it as a normal number?
- 32.🌈 Which colour is #ff0000? (a) cyan (b) bright green (c) red (d) magenta
- 33.🌈 In #0000ac the blue part is the hex number ac. What is it as a normal number?
- 34.🌈 Which colour of light is strongest in rgb(218, 94, 105)? (a) blue (b) green (c) red
- 35.🌈 Which colour is #000000? (a) black (b) cyan (c) blue (d) yellow
- 36.🌈 Which colour of light is strongest in rgb(169, 125, 13)? (a) blue (b) green (c) red
- 37.🌈 In #00000f the blue part is the hex number 0f. What is it as a normal number?
- 38.🌈 Which colour of light is strongest in rgb(71, 170, 74)? (a) green (b) red (c) blue
- 39.🌈 Which colour of light is strongest in rgb(248, 36, 9)? (a) red (b) green (c) blue
- 40.🌈 Which colour of light is strongest in rgb(188, 32, 2)? (a) green (b) red (c) blue
Answer key
- #ff00ff
- blue
- 18
- #ffffff
- red
- #0000ff
- red
- blue
- red
- 255
- 59
- red
- red
- green
- 8
- 3
- blue
- red
- #00ffff
- red
- magenta
- F
- #000000
- bright green
- red
- blue
- bright green
- green
- 209
- yellow
- 92
- red
- 172
- red
- black
- red
- 15
- green
- red
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids