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 #ffffff? (a) yellow (b) cyan (c) white (d) black
- 2.🌈 In #390000 the red part is the hex number 39. What is it as a normal number?
- 3.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) red (c) green (d) white
- 4.🌈 Which colour is #0000ff? (a) black (b) magenta (c) blue (d) bright green
- 5.🌈 Which colour is #00ff00? (a) white (b) bright green (c) red (d) black
- 6.🌈 In #000058 the blue part is the hex number 58. What is it as a normal number?
- 7.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) F (c) J (d) Z
- 8.🌈 Which colour is #ff0000? (a) red (b) cyan (c) yellow (d) bright green
- 9.🌈 Which hex code is blue? (a) #0000ff (b) #000000 (c) #ff0000 (d) #ffffff
- 10.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 2 (d) 3
- 11.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) red (d) black
- 12.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) magenta (c) bright green (d) black
- 13.🌈 Which colour of light is strongest in rgb(194, 113, 55)? (a) blue (b) red (c) green
- 14.🌈 Which hex code is black? (a) #00ff00 (b) #0000ff (c) #ffffff (d) #000000
- 15.🌈 In #3e0000 the red part is the hex number 3e. What is it as a normal number?
- 16.🌈 Which colour of light is strongest in rgb(132, 180, 73)? (a) red (b) green (c) blue
- 17.🌈 In #00c200 the green part is the hex number c2. What is it as a normal number?
- 18.🌈 In #d00000 the red part is the hex number d0. What is it as a normal number?
- 19.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 255 (d) 1000
- 20.🌈 Which hex code is bright green? (a) #ff00ff (b) #ffffff (c) #00ff00 (d) #000000
- 21.🌈 Which hex code is yellow? (a) #ff0000 (b) #ffff00 (c) #0000ff (d) #ff00ff
- 22.🌈 In #0000ac the blue part is the hex number ac. What is it as a normal number?
- 23.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) blue (c) red (d) magenta
- 24.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) cyan (c) red (d) magenta
- 25.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) red (c) bright green (d) blue
- 26.🌈 In #006400 the green part is the hex number 64. What is it as a normal number?
- 27.🌈 Which colour of light is strongest in rgb(87, 101, 211)? (a) red (b) green (c) blue
- 28.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) bright green (c) black (d) white
- 29.🌈 In #000041 the blue part is the hex number 41. What is it as a normal number?
- 30.🌈 In #001000 the green part is the hex number 10. What is it as a normal number?
- 31.🌈 Which colour of light is strongest in rgb(105, 246, 55)? (a) blue (b) green (c) red
- 32.🌈 Which colour of light is strongest in rgb(48, 233, 34)? (a) green (b) red (c) blue
- 33.🌈 Which colour of light is strongest in rgb(21, 161, 35)? (a) blue (b) red (c) green
- 34.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) bright green (c) blue (d) cyan
- 35.🌈 Which colour of light is strongest in rgb(139, 156, 135)? (a) blue (b) red (c) green
- 36.🌈 Which colour of light is strongest in rgb(212, 56, 80)? (a) green (b) blue (c) red
- 37.🌈 In #002800 the green part is the hex number 28. What is it as a normal number?
- 38.🌈 Which colour of light is strongest in rgb(116, 231, 37)? (a) red (b) blue (c) green
- 39.🌈 Which hex code is white? (a) #ffffff (b) #00ffff (c) #00ff00 (d) #ff0000
- 40.🌈 Which colour of light is strongest in rgb(122, 56, 202)? (a) red (b) blue (c) green
Answer key
- white
- 57
- blue
- blue
- bright green
- 88
- F
- red
- #0000ff
- 3
- red
- bright green
- red
- #000000
- 62
- green
- 194
- 208
- 255
- #00ff00
- #ffff00
- 172
- red
- yellow
- blue
- 100
- blue
- black
- 65
- 16
- green
- green
- green
- cyan
- green
- red
- 40
- green
- #ffffff
- blue
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids