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 #rrggbb, which colour do the first two digits give? (a) green (b) black (c) red (d) blue
- 2.🌈 Which colour of light is strongest in rgb(248, 20, 49)? (a) blue (b) red (c) green
- 3.🌈 Which colour is #ff0000? (a) white (b) red (c) blue (d) magenta
- 4.🌈 In #000072 the blue part is the hex number 72. What is it as a normal number?
- 5.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) Z (c) J (d) G
- 6.🌈 Which colour of light is strongest in rgb(25, 229, 136)? (a) red (b) blue (c) green
- 7.🌈 Which colour of light is strongest in rgb(113, 176, 32)? (a) red (b) blue (c) green
- 8.🌈 Which colour is #00ff00? (a) cyan (b) white (c) blue (d) bright green
- 9.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 255 (c) 100 (d) 99
- 10.🌈 In #000084 the blue part is the hex number 84. What is it as a normal number?
- 11.🌈 Which colour is rgb(255, 0, 255)? (a) red (b) magenta (c) cyan (d) bright green
- 12.🌈 Which hex code is bright green? (a) #ffffff (b) #ffff00 (c) #00ffff (d) #00ff00
- 13.🌈 Which colour of light is strongest in rgb(72, 185, 37)? (a) blue (b) red (c) green
- 14.🌈 In #000049 the blue part is the hex number 49. What is it as a normal number?
- 15.🌈 Which colour of light is strongest in rgb(166, 49, 20)? (a) blue (b) red (c) green
- 16.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 2 (c) 3 (d) 4
- 17.🌈 Which colour is #ff00ff? (a) white (b) black (c) red (d) magenta
- 18.🌈 Which colour of light is strongest in rgb(230, 16, 74)? (a) blue (b) red (c) green
- 19.🌈 Which hex code is black? (a) #000000 (b) #ffffff (c) #0000ff (d) #ff0000
- 20.🌈 In #004f00 the green part is the hex number 4f. What is it as a normal number?
- 21.🌈 In #210000 the red part is the hex number 21. What is it as a normal number?
- 22.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) white (c) magenta (d) bright green
- 23.🌈 Which colour of light is strongest in rgb(27, 203, 18)? (a) green (b) blue (c) red
- 24.🌈 Which hex code is cyan? (a) #ff00ff (b) #ffff00 (c) #ffffff (d) #00ffff
- 25.🌈 Which colour is #00ffff? (a) yellow (b) bright green (c) cyan (d) red
- 26.🌈 Which hex code is blue? (a) #0000ff (b) #ff0000 (c) #00ff00 (d) #000000
- 27.🌈 In #000068 the blue part is the hex number 68. What is it as a normal number?
- 28.🌈 In #120000 the red part is the hex number 12. What is it as a normal number?
- 29.🌈 In #750000 the red part is the hex number 75. What is it as a normal number?
- 30.🌈 Which colour is rgb(0, 255, 0)? (a) magenta (b) bright green (c) blue (d) cyan
- 31.🌈 In #00002c the blue part is the hex number 2c. What is it as a normal number?
- 32.🌈 Which colour of light is strongest in rgb(41, 165, 60)? (a) blue (b) green (c) red
- 33.🌈 Which colour of light is strongest in rgb(152, 10, 89)? (a) red (b) blue (c) green
- 34.🌈 Which colour of light is strongest in rgb(48, 207, 9)? (a) blue (b) green (c) red
- 35.🌈 In #00eb00 the green part is the hex number eb. What is it as a normal number?
- 36.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) blue (d) white
- 37.🌈 Which hex code is magenta? (a) #ffff00 (b) #ff0000 (c) #0000ff (d) #ff00ff
- 38.🌈 Which hex code is red? (a) #ffff00 (b) #ff0000 (c) #00ff00 (d) #ffffff
- 39.🌈 In #a20000 the red part is the hex number a2. What is it as a normal number?
- 40.🌈 In #b70000 the red part is the hex number b7. What is it as a normal number?
Answer key
- red
- red
- red
- 114
- F
- green
- green
- bright green
- 255
- 132
- magenta
- #00ff00
- green
- 73
- red
- 3
- magenta
- red
- #000000
- 79
- 33
- blue
- green
- #00ffff
- cyan
- #0000ff
- 104
- 18
- 117
- bright green
- 44
- green
- red
- green
- 235
- blue
- #ff00ff
- #ff0000
- 162
- 183
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids