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 rgb(255, 255, 0)? (a) cyan (b) yellow (c) bright green (d) white
- 2.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) Z (d) G
- 3.🌈 In #e30000 the red part is the hex number e3. What is it as a normal number?
- 4.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 6 (d) 3
- 5.🌈 Which colour is #ffffff? (a) blue (b) white (c) red (d) cyan
- 6.🌈 Which hex code is red? (a) #0000ff (b) #ffff00 (c) #ff00ff (d) #ff0000
- 7.🌈 Which colour is #ffff00? (a) black (b) yellow (c) bright green (d) red
- 8.🌈 Which colour is #0000ff? (a) blue (b) cyan (c) black (d) yellow
- 9.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) red (d) blue
- 10.🌈 In #001000 the green part is the hex number 10. What is it as a normal number?
- 11.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) white (c) cyan (d) yellow
- 12.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) bright green (c) cyan (d) magenta
- 13.🌈 In #190000 the red part is the hex number 19. What is it as a normal number?
- 14.🌈 In #00002c the blue part is the hex number 2c. What is it as a normal number?
- 15.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) green (d) black
- 16.🌈 Which colour is #ff0000? (a) cyan (b) blue (c) magenta (d) red
- 17.🌈 Which hex code is yellow? (a) #ffffff (b) #0000ff (c) #00ffff (d) #ffff00
- 18.🌈 Which colour is #00ffff? (a) magenta (b) blue (c) cyan (d) yellow
- 19.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 1000 (c) 100 (d) 255
- 20.🌈 In #000090 the blue part is the hex number 90. What is it as a normal number?
- 21.🌈 Which colour is #000000? (a) black (b) cyan (c) yellow (d) red
- 22.🌈 In #006500 the green part is the hex number 65. What is it as a normal number?
- 23.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) magenta (c) blue (d) bright green
- 24.🌈 In #002a00 the green part is the hex number 2a. What is it as a normal number?
- 25.🌈 Which hex code is white? (a) #00ff00 (b) #ffffff (c) #000000 (d) #ff0000
- 26.🌈 Which hex code is cyan? (a) #ffff00 (b) #ff0000 (c) #0000ff (d) #00ffff
- 27.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) bright green (c) black (d) red
- 28.🌈 Which colour is #00ff00? (a) red (b) magenta (c) bright green (d) black
- 29.🌈 In #000032 the blue part is the hex number 32. What is it as a normal number?
- 30.🌈 Which colour of light is strongest in rgb(98, 42, 252)? (a) green (b) red (c) blue
- 31.🌈 In #2e0000 the red part is the hex number 2e. What is it as a normal number?
- 32.🌈 In #000092 the blue part is the hex number 92. What is it as a normal number?
- 33.🌈 In #0000db the blue part is the hex number db. What is it as a normal number?
- 34.🌈 Which hex code is bright green? (a) #ff0000 (b) #00ffff (c) #ffff00 (d) #00ff00
- 35.🌈 In #000034 the blue part is the hex number 34. What is it as a normal number?
- 36.🌈 Which colour of light is strongest in rgb(112, 230, 86)? (a) red (b) blue (c) green
- 37.🌈 In #008500 the green part is the hex number 85. What is it as a normal number?
- 38.🌈 Which colour of light is strongest in rgb(80, 83, 254)? (a) red (b) green (c) blue
- 39.🌈 In #c00000 the red part is the hex number c0. What is it as a normal number?
- 40.🌈 Which colour of light is strongest in rgb(231, 29, 34)? (a) blue (b) green (c) red
Answer key
- yellow
- F
- 227
- 3
- white
- #ff0000
- yellow
- blue
- blue
- 16
- white
- bright green
- 25
- 44
- red
- red
- #ffff00
- cyan
- 255
- 144
- black
- 101
- magenta
- 42
- #ffffff
- #00ffff
- red
- bright green
- 50
- blue
- 46
- 146
- 219
- #00ff00
- 52
- green
- 133
- blue
- 192
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids