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 #ffff00? (a) bright green (b) magenta (c) yellow (d) white
- 2.🌈 Which colour is #00ffff? (a) black (b) bright green (c) cyan (d) yellow
- 3.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) bright green (c) blue (d) cyan
- 4.🌈 Which hex code is blue? (a) #000000 (b) #00ff00 (c) #ffff00 (d) #0000ff
- 5.🌈 In #000083 the blue part is the hex number 83. What is it as a normal number?
- 6.🌈 Which colour is #ff00ff? (a) magenta (b) yellow (c) blue (d) bright green
- 7.🌈 Which colour of light is strongest in rgb(174, 66, 17)? (a) blue (b) green (c) red
- 8.🌈 Which colour of light is strongest in rgb(228, 31, 54)? (a) blue (b) green (c) red
- 9.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) J (d) Z
- 10.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) blue (d) green
- 11.🌈 Which colour is #000000? (a) black (b) blue (c) magenta (d) yellow
- 12.🌈 Which colour of light is strongest in rgb(183, 5, 47)? (a) green (b) red (c) blue
- 13.🌈 In #001900 the green part is the hex number 19. What is it as a normal number?
- 14.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) bright green (c) yellow (d) red
- 15.🌈 Which hex code is red? (a) #0000ff (b) #ff0000 (c) #ff00ff (d) #00ff00
- 16.🌈 Which colour of light is strongest in rgb(139, 35, 237)? (a) blue (b) green (c) red
- 17.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) red (c) blue (d) magenta
- 18.🌈 In #de0000 the red part is the hex number de. What is it as a normal number?
- 19.🌈 In #000010 the blue part is the hex number 10. What is it as a normal number?
- 20.🌈 Which colour is #00ff00? (a) blue (b) red (c) magenta (d) bright green
- 21.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) yellow (c) magenta (d) red
- 22.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) red (c) blue (d) white
- 23.🌈 Which colour is #ffffff? (a) red (b) magenta (c) white (d) bright green
- 24.🌈 Which colour of light is strongest in rgb(37, 150, 102)? (a) red (b) blue (c) green
- 25.🌈 In #fd0000 the red part is the hex number fd. What is it as a normal number?
- 26.🌈 In #660000 the red part is the hex number 66. What is it as a normal number?
- 27.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 6 (c) 4 (d) 3
- 28.🌈 Which hex code is cyan? (a) #ff0000 (b) #00ffff (c) #00ff00 (d) #ffffff
- 29.🌈 Which colour is #0000ff? (a) red (b) blue (c) yellow (d) black
- 30.🌈 In #0f0000 the red part is the hex number 0f. What is it as a normal number?
- 31.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) blue (c) yellow (d) bright green
- 32.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 255 (c) 99 (d) 1000
- 33.🌈 Which hex code is white? (a) #00ffff (b) #ffffff (c) #ff0000 (d) #ffff00
- 34.🌈 Which colour of light is strongest in rgb(124, 181, 118)? (a) red (b) blue (c) green
- 35.🌈 Which hex code is bright green? (a) #ff0000 (b) #ff00ff (c) #00ff00 (d) #ffff00
- 36.🌈 Which colour of light is strongest in rgb(175, 0, 127)? (a) green (b) blue (c) red
- 37.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) blue (d) red
- 38.🌈 In #810000 the red part is the hex number 81. What is it as a normal number?
- 39.🌈 Which colour of light is strongest in rgb(58, 161, 13)? (a) green (b) red (c) blue
- 40.🌈 In #e00000 the red part is the hex number e0. What is it as a normal number?
Answer key
- yellow
- cyan
- black
- #0000ff
- 131
- magenta
- red
- red
- F
- red
- black
- red
- 25
- bright green
- #ff0000
- blue
- blue
- 222
- 16
- bright green
- red
- white
- white
- green
- 253
- 102
- 3
- #00ffff
- blue
- 15
- yellow
- 255
- #ffffff
- green
- #00ff00
- red
- blue
- 129
- green
- 224
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids