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 of light is strongest in rgb(111, 24, 237)? (a) red (b) blue (c) green
- 2.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) blue (d) black
- 3.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) green (c) white (d) red
- 4.🌈 Which colour of light is strongest in rgb(242, 115, 74)? (a) green (b) blue (c) red
- 5.🌈 In #000012 the blue part is the hex number 12. What is it as a normal number?
- 6.🌈 Which colour is #ffff00? (a) magenta (b) blue (c) red (d) yellow
- 7.🌈 In #0000e2 the blue part is the hex number e2. What is it as a normal number?
- 8.🌈 Which colour is #ff00ff? (a) magenta (b) black (c) red (d) blue
- 9.🌈 Which colour of light is strongest in rgb(124, 3, 222)? (a) blue (b) red (c) green
- 10.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) magenta (c) red (d) cyan
- 11.🌈 In #0000fc the blue part is the hex number fc. What is it as a normal number?
- 12.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) red (c) magenta (d) black
- 13.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) white (c) black (d) cyan
- 14.🌈 Which colour is #00ff00? (a) cyan (b) red (c) bright green (d) blue
- 15.🌈 In #0000d8 the blue part is the hex number d8. What is it as a normal number?
- 16.🌈 Which hex code is black? (a) #ff0000 (b) #000000 (c) #00ff00 (d) #ffffff
- 17.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) yellow (c) red (d) blue
- 18.🌈 Which hex code is blue? (a) #ff00ff (b) #00ff00 (c) #0000ff (d) #ffff00
- 19.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 6 (d) 4
- 20.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) yellow (c) blue (d) magenta
- 21.🌈 Which colour is #000000? (a) black (b) red (c) white (d) cyan
- 22.🌈 Which colour is #ff0000? (a) magenta (b) cyan (c) yellow (d) red
- 23.🌈 In #00b200 the green part is the hex number b2. What is it as a normal number?
- 24.🌈 Which colour of light is strongest in rgb(121, 136, 187)? (a) green (b) blue (c) red
- 25.🌈 In #bf0000 the red part is the hex number bf. What is it as a normal number?
- 26.🌈 Which colour of light is strongest in rgb(68, 86, 152)? (a) green (b) blue (c) red
- 27.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) J (c) F (d) Z
- 28.🌈 Which colour is #ffffff? (a) magenta (b) cyan (c) bright green (d) white
- 29.🌈 In #000d00 the green part is the hex number 0d. What is it as a normal number?
- 30.🌈 Which colour of light is strongest in rgb(7, 172, 43)? (a) blue (b) green (c) red
- 31.🌈 In #620000 the red part is the hex number 62. What is it as a normal number?
- 32.🌈 Which colour of light is strongest in rgb(51, 132, 206)? (a) blue (b) red (c) green
- 33.🌈 Which colour of light is strongest in rgb(93, 51, 234)? (a) green (b) red (c) blue
- 34.🌈 Which hex code is bright green? (a) #000000 (b) #ffffff (c) #ffff00 (d) #00ff00
- 35.🌈 Which colour of light is strongest in rgb(14, 25, 215)? (a) red (b) green (c) blue
- 36.🌈 Which colour is #0000ff? (a) white (b) magenta (c) yellow (d) blue
- 37.🌈 Which hex code is red? (a) #ff00ff (b) #00ff00 (c) #ffffff (d) #ff0000
- 38.🌈 In #00ff00 the green part is the hex number ff. What is it as a normal number?
- 39.🌈 Which colour is #00ffff? (a) red (b) bright green (c) yellow (d) cyan
- 40.🌈 In #b70000 the red part is the hex number b7. What is it as a normal number?
Answer key
- blue
- red
- blue
- red
- 18
- yellow
- 226
- magenta
- blue
- yellow
- 252
- black
- white
- bright green
- 216
- #000000
- cyan
- #0000ff
- 3
- magenta
- black
- red
- 178
- blue
- 191
- blue
- F
- white
- 13
- green
- 98
- blue
- blue
- #00ff00
- blue
- blue
- #ff0000
- 255
- cyan
- 183
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids