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(115, 49, 254)? (a) green (b) red (c) blue
- 2.🌈 Which hex code is red? (a) #00ff00 (b) #000000 (c) #ff0000 (d) #ffffff
- 3.🌈 In #00002c the blue part is the hex number 2c. What is it as a normal number?
- 4.🌈 Which colour of light is strongest in rgb(53, 154, 59)? (a) blue (b) red (c) green
- 5.🌈 Which hex code is yellow? (a) #ffff00 (b) #ff00ff (c) #00ffff (d) #ffffff
- 6.🌈 Which colour is #0000ff? (a) blue (b) red (c) bright green (d) magenta
- 7.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) J (c) F (d) Z
- 8.🌈 Which hex code is bright green? (a) #00ff00 (b) #00ffff (c) #0000ff (d) #ffffff
- 9.🌈 Which colour of light is strongest in rgb(56, 235, 21)? (a) green (b) red (c) blue
- 10.🌈 In #0000fe the blue part is the hex number fe. What is it as a normal number?
- 11.🌈 Which colour is #ff0000? (a) blue (b) bright green (c) magenta (d) red
- 12.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) cyan (c) bright green (d) white
- 13.🌈 Which colour of light is strongest in rgb(70, 187, 82)? (a) blue (b) green (c) red
- 14.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 6 (c) 2 (d) 4
- 15.🌈 Which hex code is white? (a) #00ff00 (b) #000000 (c) #ffffff (d) #ff00ff
- 16.🌈 In #c50000 the red part is the hex number c5. What is it as a normal number?
- 17.🌈 In #0000b0 the blue part is the hex number b0. What is it as a normal number?
- 18.🌈 Which colour is #ffffff? (a) blue (b) bright green (c) white (d) yellow
- 19.🌈 In #001c00 the green part is the hex number 1c. What is it as a normal number?
- 20.🌈 In #000066 the blue part is the hex number 66. What is it as a normal number?
- 21.🌈 Which colour of light is strongest in rgb(153, 43, 96)? (a) blue (b) green (c) red
- 22.🌈 Which hex code is magenta? (a) #00ff00 (b) #ff00ff (c) #ffff00 (d) #0000ff
- 23.🌈 Which colour is #ffff00? (a) blue (b) yellow (c) red (d) bright green
- 24.🌈 Which colour of light is strongest in rgb(24, 180, 75)? (a) blue (b) red (c) green
- 25.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) blue (c) red (d) white
- 26.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
- 27.🌈 Which colour of light is strongest in rgb(86, 30, 229)? (a) blue (b) green (c) red
- 28.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) cyan (c) blue (d) bright green
- 29.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) blue (c) red (d) magenta
- 30.🌈 Which colour of light is strongest in rgb(122, 203, 137)? (a) green (b) blue (c) red
- 31.🌈 Which colour of light is strongest in rgb(84, 13, 171)? (a) red (b) green (c) blue
- 32.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) magenta (c) cyan (d) white
- 33.🌈 In #00a000 the green part is the hex number a0. What is it as a normal number?
- 34.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) yellow (c) bright green (d) cyan
- 35.🌈 Which colour of light is strongest in rgb(24, 163, 85)? (a) red (b) blue (c) green
- 36.🌈 In #2d0000 the red part is the hex number 2d. What is it as a normal number?
- 37.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) black (c) white (d) bright green
- 38.🌈 In #00000a the blue part is the hex number 0a. What is it as a normal number?
- 39.🌈 In #005600 the green part is the hex number 56. What is it as a normal number?
- 40.🌈 In #120000 the red part is the hex number 12. What is it as a normal number?
Answer key
- blue
- #ff0000
- 44
- green
- #ffff00
- blue
- F
- #00ff00
- green
- 254
- red
- blue
- green
- 3
- #ffffff
- 197
- 176
- white
- 28
- 102
- red
- #ff00ff
- yellow
- green
- red
- red
- blue
- yellow
- magenta
- green
- blue
- cyan
- 160
- bright green
- green
- 45
- white
- 10
- 86
- 18
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids