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.🌈 In #006900 the green part is the hex number 69. What is it as a normal number?
- 2.🌈 In #004500 the green part is the hex number 45. What is it as a normal number?
- 3.🌈 Which colour is #ffffff? (a) magenta (b) white (c) cyan (d) bright green
- 4.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) magenta (c) red (d) bright green
- 5.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) blue (d) red
- 6.🌈 In #0000cb the blue part is the hex number cb. What is it as a normal number?
- 7.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 6 (d) 3
- 8.🌈 Which colour of light is strongest in rgb(75, 231, 109)? (a) green (b) blue (c) red
- 9.🌈 Which colour is #ffff00? (a) black (b) red (c) magenta (d) yellow
- 10.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) F (c) J (d) G
- 11.🌈 In #00e300 the green part is the hex number e3. What is it as a normal number?
- 12.🌈 In #520000 the red part is the hex number 52. What is it as a normal number?
- 13.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) bright green (c) white (d) red
- 14.🌈 Which hex code is black? (a) #ff00ff (b) #000000 (c) #ff0000 (d) #00ff00
- 15.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 255 (c) 99 (d) 100
- 16.🌈 Which hex code is bright green? (a) #00ff00 (b) #0000ff (c) #ff0000 (d) #000000
- 17.🌈 Which colour of light is strongest in rgb(243, 87, 6)? (a) red (b) blue (c) green
- 18.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) blue (d) white
- 19.🌈 Which colour of light is strongest in rgb(95, 134, 185)? (a) red (b) blue (c) green
- 20.🌈 Which hex code is magenta? (a) #00ffff (b) #ff0000 (c) #000000 (d) #ff00ff
- 21.🌈 Which colour is rgb(255, 0, 255)? (a) blue (b) magenta (c) black (d) red
- 22.🌈 Which colour is #ff00ff? (a) bright green (b) cyan (c) red (d) magenta
- 23.🌈 Which colour is #ff0000? (a) white (b) red (c) blue (d) yellow
- 24.🌈 Which hex code is white? (a) #000000 (b) #ff0000 (c) #00ff00 (d) #ffffff
- 25.🌈 In #0000cd the blue part is the hex number cd. What is it as a normal number?
- 26.🌈 In #00ca00 the green part is the hex number ca. What is it as a normal number?
- 27.🌈 Which hex code is blue? (a) #000000 (b) #ffff00 (c) #0000ff (d) #ffffff
- 28.🌈 Which colour is #00ff00? (a) white (b) black (c) bright green (d) red
- 29.🌈 Which colour is #0000ff? (a) blue (b) cyan (c) white (d) bright green
- 30.🌈 Which colour is rgb(0, 255, 255)? (a) red (b) cyan (c) black (d) yellow
- 31.🌈 In #000037 the blue part is the hex number 37. What is it as a normal number?
- 32.🌈 In #1f0000 the red part is the hex number 1f. What is it as a normal number?
- 33.🌈 Which colour of light is strongest in rgb(105, 80, 204)? (a) red (b) green (c) blue
- 34.🌈 In #c50000 the red part is the hex number c5. What is it as a normal number?
- 35.🌈 In #9c0000 the red part is the hex number 9c. What is it as a normal number?
- 36.🌈 Which colour is rgb(0, 255, 0)? (a) magenta (b) blue (c) bright green (d) red
- 37.🌈 In #00005a the blue part is the hex number 5a. What is it as a normal number?
- 38.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) cyan (c) red (d) yellow
- 39.🌈 Which colour of light is strongest in rgb(138, 153, 132)? (a) red (b) blue (c) green
- 40.🌈 Which colour of light is strongest in rgb(218, 136, 103)? (a) blue (b) red (c) green
Answer key
- 105
- 69
- white
- red
- red
- 203
- 3
- green
- yellow
- F
- 227
- 82
- yellow
- #000000
- 255
- #00ff00
- red
- blue
- blue
- #ff00ff
- magenta
- magenta
- red
- #ffffff
- 205
- 202
- #0000ff
- bright green
- blue
- cyan
- 55
- 31
- blue
- 197
- 156
- bright green
- 90
- white
- green
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids