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 #380000 the red part is the hex number 38. What is it as a normal number?
- 2.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) black (c) cyan (d) magenta
- 3.🌈 Which colour is rgb(0, 0, 255)? (a) white (b) cyan (c) red (d) blue
- 4.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) black (c) bright green (d) yellow
- 5.🌈 Which hex code is magenta? (a) #00ff00 (b) #0000ff (c) #ff00ff (d) #ffffff
- 6.🌈 Which colour of light is strongest in rgb(242, 32, 22)? (a) green (b) red (c) blue
- 7.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 99 (c) 255 (d) 100
- 8.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) white (c) red (d) cyan
- 9.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) red (c) black (d) white
- 10.🌈 Which hex code is red? (a) #ff0000 (b) #00ffff (c) #0000ff (d) #ff00ff
- 11.🌈 Which colour of light is strongest in rgb(247, 54, 37)? (a) green (b) blue (c) red
- 12.🌈 Which colour of light is strongest in rgb(65, 241, 63)? (a) red (b) blue (c) green
- 13.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) F (c) Z (d) J
- 14.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) red (d) white
- 15.🌈 In #007a00 the green part is the hex number 7a. What is it as a normal number?
- 16.🌈 Which colour is #0000ff? (a) bright green (b) yellow (c) cyan (d) blue
- 17.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 2 (d) 6
- 18.🌈 In #0000f3 the blue part is the hex number f3. What is it as a normal number?
- 19.🌈 In #f30000 the red part is the hex number f3. What is it as a normal number?
- 20.🌈 Which colour is #00ffff? (a) cyan (b) white (c) magenta (d) yellow
- 21.🌈 Which colour is #00ff00? (a) magenta (b) white (c) bright green (d) blue
- 22.🌈 Which colour of light is strongest in rgb(209, 27, 38)? (a) blue (b) red (c) green
- 23.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) cyan (c) bright green (d) magenta
- 24.🌈 In #4b0000 the red part is the hex number 4b. What is it as a normal number?
- 25.🌈 Which hex code is bright green? (a) #00ff00 (b) #ff00ff (c) #ffffff (d) #0000ff
- 26.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
- 27.🌈 Which colour of light is strongest in rgb(55, 106, 226)? (a) blue (b) green (c) red
- 28.🌈 Which hex code is blue? (a) #ffff00 (b) #0000ff (c) #ffffff (d) #ff00ff
- 29.🌈 Which colour is #000000? (a) red (b) black (c) bright green (d) yellow
- 30.🌈 Which colour of light is strongest in rgb(161, 10, 76)? (a) green (b) blue (c) red
- 31.🌈 Which colour of light is strongest in rgb(173, 122, 110)? (a) red (b) green (c) blue
- 32.🌈 In #000097 the blue part is the hex number 97. What is it as a normal number?
- 33.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) white (c) bright green (d) magenta
- 34.🌈 Which hex code is white? (a) #00ff00 (b) #ff0000 (c) #000000 (d) #ffffff
- 35.🌈 Which colour of light is strongest in rgb(231, 27, 104)? (a) green (b) red (c) blue
- 36.🌈 In #0b0000 the red part is the hex number 0b. What is it as a normal number?
- 37.🌈 Which colour is #ff0000? (a) blue (b) cyan (c) red (d) white
- 38.🌈 In #002600 the green part is the hex number 26. What is it as a normal number?
- 39.🌈 Which hex code is cyan? (a) #ff0000 (b) #0000ff (c) #000000 (d) #00ffff
- 40.🌈 Which colour of light is strongest in rgb(77, 254, 10)? (a) red (b) blue (c) green
Answer key
- 56
- black
- blue
- bright green
- #ff00ff
- red
- 255
- cyan
- white
- #ff0000
- red
- green
- F
- blue
- 122
- blue
- 3
- 243
- 243
- cyan
- bright green
- red
- magenta
- 75
- #00ff00
- red
- blue
- #0000ff
- black
- red
- red
- 151
- red
- #ffffff
- red
- 11
- red
- 38
- #00ffff
- green
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids