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) 3 (d) 4
- 2.🌈 Which colour of light is strongest in rgb(171, 97, 47)? (a) red (b) blue (c) green
- 3.🌈 Which hex code is yellow? (a) #0000ff (b) #ff0000 (c) #00ff00 (d) #ffff00
- 4.🌈 Which hex code is red? (a) #00ffff (b) #ff0000 (c) #0000ff (d) #00ff00
- 5.🌈 In #bf0000 the red part is the hex number bf. What is it as a normal number?
- 6.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) bright green (c) blue (d) yellow
- 7.🌈 In #0000f0 the blue part is the hex number f0. What is it as a normal number?
- 8.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) blue (c) magenta (d) bright green
- 9.🌈 In #730000 the red part is the hex number 73. What is it as a normal number?
- 10.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) white (c) red (d) yellow
- 11.🌈 Which hex code is blue? (a) #000000 (b) #0000ff (c) #ffffff (d) #ff0000
- 12.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) F (c) J (d) Z
- 13.🌈 In #008b00 the green part is the hex number 8b. What is it as a normal number?
- 14.🌈 Which colour is #0000ff? (a) red (b) bright green (c) blue (d) black
- 15.🌈 Which hex code is magenta? (a) #ffffff (b) #ff00ff (c) #0000ff (d) #00ffff
- 16.🌈 Which hex code is black? (a) #00ffff (b) #ffff00 (c) #000000 (d) #00ff00
- 17.🌈 Which colour is #ffff00? (a) blue (b) yellow (c) magenta (d) black
- 18.🌈 In #000071 the blue part is the hex number 71. What is it as a normal number?
- 19.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 255 (c) 99 (d) 100
- 20.🌈 Which colour is #ff00ff? (a) cyan (b) magenta (c) red (d) bright green
- 21.🌈 Which colour is #ff0000? (a) black (b) white (c) red (d) bright green
- 22.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
- 23.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) white (c) cyan (d) red
- 24.🌈 Which colour of light is strongest in rgb(176, 73, 123)? (a) blue (b) red (c) green
- 25.🌈 In #540000 the red part is the hex number 54. What is it as a normal number?
- 26.🌈 In #000044 the blue part is the hex number 44. What is it as a normal number?
- 27.🌈 In #00007d the blue part is the hex number 7d. What is it as a normal number?
- 28.🌈 In #00fc00 the green part is the hex number fc. What is it as a normal number?
- 29.🌈 Which colour is #00ffff? (a) magenta (b) white (c) red (d) cyan
- 30.🌈 Which colour is #ffffff? (a) red (b) white (c) black (d) cyan
- 31.🌈 Which colour of light is strongest in rgb(48, 193, 85)? (a) blue (b) red (c) green
- 32.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) white (c) green (d) red
- 33.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) blue (c) yellow (d) cyan
- 34.🌈 In #006a00 the green part is the hex number 6a. What is it as a normal number?
- 35.🌈 Which colour is #000000? (a) black (b) bright green (c) magenta (d) blue
- 36.🌈 In #000033 the blue part is the hex number 33. What is it as a normal number?
- 37.🌈 Which colour of light is strongest in rgb(224, 117, 137)? (a) green (b) red (c) blue
- 38.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) cyan (c) yellow (d) blue
- 39.🌈 In #00e900 the green part is the hex number e9. What is it as a normal number?
- 40.🌈 In #000095 the blue part is the hex number 95. What is it as a normal number?
Answer key
- 3
- red
- #ffff00
- #ff0000
- 191
- blue
- 240
- bright green
- 115
- white
- #0000ff
- F
- 139
- blue
- #ff00ff
- #000000
- yellow
- 113
- 255
- magenta
- red
- red
- red
- red
- 84
- 68
- 125
- 252
- cyan
- white
- green
- blue
- cyan
- 106
- black
- 51
- red
- yellow
- 233
- 149
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids