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.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 6 (c) 4 (d) 3
- 2.🌈 Which hex code is red? (a) #000000 (b) #0000ff (c) #ff0000 (d) #ffff00
- 3.🌈 Which colour is #0000ff? (a) black (b) blue (c) white (d) red
- 4.🌈 Which colour of light is strongest in rgb(99, 232, 11)? (a) green (b) blue (c) red
- 5.🌈 In #00001f the blue part is the hex number 1f. What is it as a normal number?
- 6.🌈 Which colour is #ff00ff? (a) cyan (b) blue (c) black (d) magenta
- 7.🌈 In #400000 the red part is the hex number 40. What is it as a normal number?
- 8.🌈 Which hex code is black? (a) #00ffff (b) #ffff00 (c) #ffffff (d) #000000
- 9.🌈 Which hex code is blue? (a) #00ffff (b) #0000ff (c) #000000 (d) #00ff00
- 10.🌈 Which colour of light is strongest in rgb(0, 197, 116)? (a) green (b) red (c) blue
- 11.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) green (d) red
- 12.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) bright green (c) white (d) cyan
- 13.🌈 In #000071 the blue part is the hex number 71. What is it as a normal number?
- 14.🌈 Which colour is #ff0000? (a) magenta (b) bright green (c) black (d) red
- 15.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 99 (c) 255 (d) 100
- 16.🌈 Which hex code is white? (a) #ff0000 (b) #00ff00 (c) #0000ff (d) #ffffff
- 17.🌈 Which hex code is yellow? (a) #ffff00 (b) #ff0000 (c) #ff00ff (d) #0000ff
- 18.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) white (d) blue
- 19.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) G (d) F
- 20.🌈 Which colour of light is strongest in rgb(174, 39, 96)? (a) red (b) green (c) blue
- 21.🌈 Which colour is #ffffff? (a) black (b) blue (c) red (d) white
- 22.🌈 Which hex code is cyan? (a) #000000 (b) #ff0000 (c) #00ffff (d) #0000ff
- 23.🌈 Which colour of light is strongest in rgb(205, 102, 62)? (a) blue (b) red (c) green
- 24.🌈 Which colour of light is strongest in rgb(157, 131, 139)? (a) red (b) green (c) blue
- 25.🌈 Which colour of light is strongest in rgb(12, 16, 154)? (a) blue (b) red (c) green
- 26.🌈 Which colour is #00ff00? (a) white (b) red (c) blue (d) bright green
- 27.🌈 Which hex code is magenta? (a) #ff00ff (b) #ff0000 (c) #ffffff (d) #00ff00
- 28.🌈 In #009c00 the green part is the hex number 9c. What is it as a normal number?
- 29.🌈 Which colour is rgb(0, 255, 0)? (a) cyan (b) white (c) blue (d) bright green
- 30.🌈 Which colour of light is strongest in rgb(119, 192, 120)? (a) red (b) blue (c) green
- 31.🌈 In #000047 the blue part is the hex number 47. What is it as a normal number?
- 32.🌈 Which colour is #000000? (a) magenta (b) blue (c) cyan (d) black
- 33.🌈 Which colour is #00ffff? (a) white (b) cyan (c) bright green (d) blue
- 34.🌈 In #000050 the blue part is the hex number 50. What is it as a normal number?
- 35.🌈 Which hex code is bright green? (a) #ffffff (b) #ffff00 (c) #00ff00 (d) #00ffff
- 36.🌈 Which colour of light is strongest in rgb(26, 102, 240)? (a) blue (b) green (c) red
- 37.🌈 Which colour of light is strongest in rgb(255, 28, 58)? (a) green (b) blue (c) red
- 38.🌈 In #006000 the green part is the hex number 60. What is it as a normal number?
- 39.🌈 In #420000 the red part is the hex number 42. What is it as a normal number?
- 40.🌈 Which colour of light is strongest in rgb(164, 51, 44)? (a) green (b) red (c) blue
Answer key
- 3
- #ff0000
- blue
- green
- 31
- magenta
- 64
- #000000
- #0000ff
- green
- red
- cyan
- 113
- red
- 255
- #ffffff
- #ffff00
- blue
- F
- red
- white
- #00ffff
- red
- red
- blue
- bright green
- #ff00ff
- 156
- bright green
- green
- 71
- black
- cyan
- 80
- #00ff00
- blue
- red
- 96
- 66
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids