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 hex code is white? (a) #ff0000 (b) #000000 (c) #ffffff (d) #0000ff
- 2.🌈 Which colour of light is strongest in rgb(13, 162, 96)? (a) red (b) blue (c) green
- 3.🌈 Which colour is #ff0000? (a) red (b) yellow (c) black (d) magenta
- 4.🌈 Which colour is rgb(0, 255, 0)? (a) cyan (b) white (c) black (d) bright green
- 5.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 4 (d) 2
- 6.🌈 Which colour is #00ff00? (a) white (b) cyan (c) red (d) bright green
- 7.🌈 Which colour of light is strongest in rgb(124, 31, 154)? (a) red (b) green (c) blue
- 8.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) green (d) red
- 9.🌈 Which hex code is bright green? (a) #0000ff (b) #ffffff (c) #00ff00 (d) #ff00ff
- 10.🌈 Which hex code is red? (a) #ffff00 (b) #ff0000 (c) #00ff00 (d) #ff00ff
- 11.🌈 In #000097 the blue part is the hex number 97. What is it as a normal number?
- 12.🌈 In #000053 the blue part is the hex number 53. What is it as a normal number?
- 13.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) J (c) F (d) Z
- 14.🌈 Which colour of light is strongest in rgb(186, 74, 137)? (a) blue (b) red (c) green
- 15.🌈 Which hex code is cyan? (a) #ffff00 (b) #00ff00 (c) #00ffff (d) #ff0000
- 16.🌈 In #f20000 the red part is the hex number f2. What is it as a normal number?
- 17.🌈 In #4c0000 the red part is the hex number 4c. What is it as a normal number?
- 18.🌈 Which colour is #00ffff? (a) cyan (b) red (c) yellow (d) magenta
- 19.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) white (c) red (d) bright green
- 20.🌈 In #0000b0 the blue part is the hex number b0. What is it as a normal number?
- 21.🌈 Which colour of light is strongest in rgb(65, 181, 54)? (a) red (b) blue (c) green
- 22.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) red (c) green (d) white
- 23.🌈 In #e50000 the red part is the hex number e5. What is it as a normal number?
- 24.🌈 In #008b00 the green part is the hex number 8b. What is it as a normal number?
- 25.🌈 In #000500 the green part is the hex number 05. What is it as a normal number?
- 26.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 1000 (d) 255
- 27.🌈 Which colour of light is strongest in rgb(90, 73, 197)? (a) green (b) red (c) blue
- 28.🌈 In #00c200 the green part is the hex number c2. What is it as a normal number?
- 29.🌈 Which colour is #ff00ff? (a) magenta (b) cyan (c) black (d) blue
- 30.🌈 In #002600 the green part is the hex number 26. What is it as a normal number?
- 31.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) red (c) bright green (d) cyan
- 32.🌈 Which hex code is black? (a) #000000 (b) #ff0000 (c) #00ffff (d) #ffff00
- 33.🌈 In #550000 the red part is the hex number 55. What is it as a normal number?
- 34.🌈 In #002900 the green part is the hex number 29. What is it as a normal number?
- 35.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) cyan (c) yellow (d) white
- 36.🌈 Which hex code is yellow? (a) #00ffff (b) #ffffff (c) #ffff00 (d) #000000
- 37.🌈 Which colour is #0000ff? (a) cyan (b) white (c) yellow (d) blue
- 38.🌈 Which colour of light is strongest in rgb(50, 218, 131)? (a) green (b) red (c) blue
- 39.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) bright green (c) cyan (d) yellow
- 40.🌈 Which colour of light is strongest in rgb(232, 99, 125)? (a) blue (b) red (c) green
Answer key
- #ffffff
- green
- red
- bright green
- 3
- bright green
- blue
- red
- #00ff00
- #ff0000
- 151
- 83
- F
- red
- #00ffff
- 242
- 76
- cyan
- red
- 176
- green
- blue
- 229
- 139
- 5
- 255
- blue
- 194
- magenta
- 38
- cyan
- #000000
- 85
- 41
- white
- #ffff00
- blue
- green
- yellow
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids