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 of light is strongest in rgb(239, 19, 9)? (a) red (b) green (c) blue
- 2.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) white (c) red (d) bright green
- 3.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) F (d) G
- 4.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) red (d) green
- 5.🌈 In #00e600 the green part is the hex number e6. What is it as a normal number?
- 6.🌈 Which colour is #000000? (a) blue (b) red (c) magenta (d) black
- 7.🌈 Which colour of light is strongest in rgb(98, 41, 210)? (a) blue (b) green (c) red
- 8.🌈 Which colour of light is strongest in rgb(176, 76, 7)? (a) blue (b) green (c) red
- 9.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 99 (d) 255
- 10.🌈 Which colour is #ff00ff? (a) bright green (b) blue (c) magenta (d) red
- 11.🌈 Which colour is #ffff00? (a) bright green (b) blue (c) red (d) yellow
- 12.🌈 In #00ff00 the green part is the hex number ff. What is it as a normal number?
- 13.🌈 In #0000ca the blue part is the hex number ca. What is it as a normal number?
- 14.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) white (c) magenta (d) bright green
- 15.🌈 Which hex code is black? (a) #ffff00 (b) #ff0000 (c) #ffffff (d) #000000
- 16.🌈 Which colour is #00ff00? (a) cyan (b) red (c) magenta (d) bright green
- 17.🌈 Which colour of light is strongest in rgb(102, 212, 1)? (a) blue (b) green (c) red
- 18.🌈 Which colour of light is strongest in rgb(106, 130, 222)? (a) red (b) green (c) blue
- 19.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) white (d) green
- 20.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 6 (d) 3
- 21.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) red (c) blue (d) yellow
- 22.🌈 In #0000db the blue part is the hex number db. What is it as a normal number?
- 23.🌈 In #003c00 the green part is the hex number 3c. What is it as a normal number?
- 24.🌈 Which colour is #ffffff? (a) cyan (b) magenta (c) red (d) white
- 25.🌈 Which hex code is blue? (a) #00ff00 (b) #ff00ff (c) #ffff00 (d) #0000ff
- 26.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) yellow (c) bright green (d) cyan
- 27.🌈 Which hex code is cyan? (a) #00ff00 (b) #ffff00 (c) #000000 (d) #00ffff
- 28.🌈 Which colour is #ff0000? (a) bright green (b) cyan (c) white (d) red
- 29.🌈 In #00e300 the green part is the hex number e3. What is it as a normal number?
- 30.🌈 In #0000f9 the blue part is the hex number f9. What is it as a normal number?
- 31.🌈 In #d90000 the red part is the hex number d9. What is it as a normal number?
- 32.🌈 Which colour of light is strongest in rgb(249, 68, 130)? (a) blue (b) red (c) green
- 33.🌈 Which colour is #00ffff? (a) black (b) bright green (c) cyan (d) blue
- 34.🌈 Which hex code is white? (a) #ff0000 (b) #ffffff (c) #ffff00 (d) #0000ff
- 35.🌈 Which colour is #0000ff? (a) red (b) magenta (c) blue (d) white
- 36.🌈 Which hex code is magenta? (a) #ff0000 (b) #0000ff (c) #ff00ff (d) #ffffff
- 37.🌈 In #9c0000 the red part is the hex number 9c. What is it as a normal number?
- 38.🌈 In #00d500 the green part is the hex number d5. What is it as a normal number?
- 39.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) blue (c) yellow (d) white
- 40.🌈 In #fc0000 the red part is the hex number fc. What is it as a normal number?
Answer key
- red
- bright green
- F
- red
- 230
- black
- blue
- red
- 255
- magenta
- yellow
- 255
- 202
- blue
- #000000
- bright green
- green
- blue
- blue
- 3
- red
- 219
- 60
- white
- #0000ff
- cyan
- #00ffff
- red
- 227
- 249
- 217
- red
- cyan
- #ffffff
- blue
- #ff00ff
- 156
- 213
- black
- 252
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids