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(29, 75, 235)? (a) green (b) blue (c) red
- 2.🌈 Which hex code is white? (a) #00ff00 (b) #ffff00 (c) #ff0000 (d) #ffffff
- 3.🌈 In #0000a9 the blue part is the hex number a9. What is it as a normal number?
- 4.🌈 Which colour of light is strongest in rgb(76, 205, 113)? (a) red (b) green (c) blue
- 5.🌈 In #0b0000 the red part is the hex number 0b. What is it as a normal number?
- 6.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 3 (d) 6
- 7.🌈 Which colour is #00ff00? (a) red (b) yellow (c) white (d) bright green
- 8.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) magenta (c) black (d) red
- 9.🌈 Which colour is #ffff00? (a) black (b) blue (c) magenta (d) yellow
- 10.🌈 In #280000 the red part is the hex number 28. What is it as a normal number?
- 11.🌈 In #00ff00 the green part is the hex number ff. What is it as a normal number?
- 12.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) G (d) F
- 13.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) red (c) green (d) white
- 14.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) green (c) blue (d) black
- 15.🌈 In #330000 the red part is the hex number 33. What is it as a normal number?
- 16.🌈 Which hex code is red? (a) #ff00ff (b) #000000 (c) #00ff00 (d) #ff0000
- 17.🌈 Which colour is #000000? (a) yellow (b) bright green (c) black (d) blue
- 18.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) yellow (c) white (d) blue
- 19.🌈 In #060000 the red part is the hex number 06. What is it as a normal number?
- 20.🌈 Which hex code is cyan? (a) #00ffff (b) #0000ff (c) #ff0000 (d) #ffffff
- 21.🌈 In #190000 the red part is the hex number 19. What is it as a normal number?
- 22.🌈 In #00000d the blue part is the hex number 0d. What is it as a normal number?
- 23.🌈 In #00f800 the green part is the hex number f8. What is it as a normal number?
- 24.🌈 Which colour is #ff00ff? (a) cyan (b) bright green (c) magenta (d) red
- 25.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) black (c) bright green (d) cyan
- 26.🌈 Which colour of light is strongest in rgb(191, 115, 110)? (a) green (b) red (c) blue
- 27.🌈 Which colour is #ffffff? (a) white (b) cyan (c) bright green (d) black
- 28.🌈 In #000a00 the green part is the hex number 0a. What is it as a normal number?
- 29.🌈 Which colour of light is strongest in rgb(115, 174, 64)? (a) red (b) blue (c) green
- 30.🌈 In #0000f9 the blue part is the hex number f9. What is it as a normal number?
- 31.🌈 Which colour of light is strongest in rgb(140, 166, 0)? (a) blue (b) red (c) green
- 32.🌈 In #008800 the green part is the hex number 88. What is it as a normal number?
- 33.🌈 In #00003a the blue part is the hex number 3a. What is it as a normal number?
- 34.🌈 Which hex code is blue? (a) #ffff00 (b) #000000 (c) #ffffff (d) #0000ff
- 35.🌈 Which colour of light is strongest in rgb(2, 119, 247)? (a) red (b) green (c) blue
- 36.🌈 Which colour is #0000ff? (a) bright green (b) magenta (c) blue (d) black
- 37.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 1000 (c) 99 (d) 100
- 38.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) red (c) bright green (d) magenta
- 39.🌈 Which hex code is bright green? (a) #00ff00 (b) #000000 (c) #0000ff (d) #00ffff
- 40.🌈 In #eb0000 the red part is the hex number eb. What is it as a normal number?
Answer key
- blue
- #ffffff
- 169
- green
- 11
- 3
- bright green
- red
- yellow
- 40
- 255
- F
- blue
- red
- 51
- #ff0000
- black
- yellow
- 6
- #00ffff
- 25
- 13
- 248
- magenta
- cyan
- red
- white
- 10
- green
- 249
- green
- 136
- 58
- #0000ff
- blue
- blue
- 255
- bright green
- #00ff00
- 235
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids