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 cyan? (a) #00ffff (b) #ff00ff (c) #ffffff (d) #0000ff
- 2.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) blue (c) bright green (d) cyan
- 3.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) blue (c) white (d) yellow
- 4.🌈 Which hex code is yellow? (a) #ffffff (b) #00ffff (c) #ffff00 (d) #00ff00
- 5.🌈 Which colour is #0000ff? (a) cyan (b) yellow (c) black (d) blue
- 6.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 255 (d) 99
- 7.🌈 Which colour is #ffffff? (a) blue (b) bright green (c) cyan (d) white
- 8.🌈 Which colour is #00ff00? (a) cyan (b) bright green (c) yellow (d) black
- 9.🌈 In #f80000 the red part is the hex number f8. What is it as a normal number?
- 10.🌈 Which colour of light is strongest in rgb(112, 249, 21)? (a) green (b) blue (c) red
- 11.🌈 Which colour of light is strongest in rgb(174, 117, 75)? (a) green (b) blue (c) red
- 12.🌈 Which colour of light is strongest in rgb(82, 158, 88)? (a) blue (b) red (c) green
- 13.🌈 Which colour of light is strongest in rgb(203, 115, 133)? (a) red (b) green (c) blue
- 14.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) Z (d) G
- 15.🌈 Which colour is #ffff00? (a) cyan (b) black (c) bright green (d) yellow
- 16.🌈 Which colour of light is strongest in rgb(6, 227, 121)? (a) blue (b) red (c) green
- 17.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) green (d) black
- 18.🌈 In #cf0000 the red part is the hex number cf. What is it as a normal number?
- 19.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) red (c) bright green (d) magenta
- 20.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 3 (d) 2
- 21.🌈 Which colour is #ff0000? (a) black (b) magenta (c) bright green (d) red
- 22.🌈 Which colour is #000000? (a) bright green (b) black (c) cyan (d) white
- 23.🌈 In #b00000 the red part is the hex number b0. What is it as a normal number?
- 24.🌈 In #003000 the green part is the hex number 30. What is it as a normal number?
- 25.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) yellow (c) magenta (d) bright green
- 26.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) green (d) red
- 27.🌈 Which colour of light is strongest in rgb(206, 140, 19)? (a) green (b) blue (c) red
- 28.🌈 In #240000 the red part is the hex number 24. What is it as a normal number?
- 29.🌈 Which hex code is black? (a) #000000 (b) #ffff00 (c) #ff00ff (d) #ffffff
- 30.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) black (c) bright green (d) blue
- 31.🌈 Which colour of light is strongest in rgb(10, 98, 247)? (a) blue (b) red (c) green
- 32.🌈 In #050000 the red part is the hex number 05. What is it as a normal number?
- 33.🌈 Which colour of light is strongest in rgb(77, 16, 169)? (a) blue (b) red (c) green
- 34.🌈 In #00fc00 the green part is the hex number fc. What is it as a normal number?
- 35.🌈 In #008800 the green part is the hex number 88. What is it as a normal number?
- 36.🌈 Which hex code is bright green? (a) #00ffff (b) #000000 (c) #ff0000 (d) #00ff00
- 37.🌈 Which colour of light is strongest in rgb(63, 244, 89)? (a) red (b) blue (c) green
- 38.🌈 Which hex code is red? (a) #000000 (b) #0000ff (c) #ffffff (d) #ff0000
- 39.🌈 Which colour of light is strongest in rgb(8, 57, 227)? (a) red (b) blue (c) green
- 40.🌈 Which hex code is white? (a) #ffff00 (b) #ffffff (c) #00ffff (d) #00ff00
Answer key
- #00ffff
- bright green
- cyan
- #ffff00
- blue
- 255
- white
- bright green
- 248
- green
- red
- green
- red
- F
- yellow
- green
- red
- 207
- magenta
- 3
- red
- black
- 176
- 48
- yellow
- blue
- red
- 36
- #000000
- black
- blue
- 5
- blue
- 252
- 136
- #00ff00
- green
- #ff0000
- blue
- #ffffff
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids