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.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 2 (d) 6
- 2.🌈 Which hex code is magenta? (a) #ff00ff (b) #ff0000 (c) #ffff00 (d) #0000ff
- 3.🌈 Which hex code is white? (a) #ff0000 (b) #ffff00 (c) #00ff00 (d) #ffffff
- 4.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) blue (c) red (d) white
- 5.🌈 In #00002d the blue part is the hex number 2d. What is it as a normal number?
- 6.🌈 Which colour is #0000ff? (a) red (b) cyan (c) blue (d) yellow
- 7.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) G (d) Z
- 8.🌈 Which colour is #00ffff? (a) black (b) cyan (c) white (d) yellow
- 9.🌈 Which colour of light is strongest in rgb(43, 186, 31)? (a) red (b) green (c) blue
- 10.🌈 Which colour is #ffffff? (a) blue (b) red (c) cyan (d) white
- 11.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) black (c) bright green (d) white
- 12.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) white (c) green (d) red
- 13.🌈 Which colour of light is strongest in rgb(255, 29, 13)? (a) red (b) blue (c) green
- 14.🌈 In #0000f4 the blue part is the hex number f4. What is it as a normal number?
- 15.🌈 Which colour of light is strongest in rgb(155, 59, 132)? (a) red (b) green (c) blue
- 16.🌈 In #0a0000 the red part is the hex number 0a. What is it as a normal number?
- 17.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) black (d) red
- 18.🌈 Which colour is #ff0000? (a) red (b) bright green (c) cyan (d) blue
- 19.🌈 Which hex code is black? (a) #000000 (b) #0000ff (c) #ff0000 (d) #ff00ff
- 20.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) cyan (c) blue (d) magenta
- 21.🌈 Which hex code is red? (a) #00ff00 (b) #00ffff (c) #ff0000 (d) #0000ff
- 22.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) blue (c) yellow (d) cyan
- 23.🌈 Which colour of light is strongest in rgb(113, 114, 174)? (a) green (b) blue (c) red
- 24.🌈 Which colour of light is strongest in rgb(138, 137, 243)? (a) red (b) green (c) blue
- 25.🌈 Which colour of light is strongest in rgb(94, 164, 121)? (a) red (b) green (c) blue
- 26.🌈 Which colour is rgb(0, 255, 255)? (a) red (b) cyan (c) blue (d) black
- 27.🌈 Which colour is #00ff00? (a) blue (b) black (c) bright green (d) yellow
- 28.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) magenta (c) yellow (d) cyan
- 29.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) magenta (c) red (d) blue
- 30.🌈 Which colour of light is strongest in rgb(14, 237, 111)? (a) red (b) blue (c) green
- 31.🌈 Which colour is #ff00ff? (a) red (b) black (c) yellow (d) magenta
- 32.🌈 Which colour of light is strongest in rgb(255, 97, 110)? (a) blue (b) green (c) red
- 33.🌈 Which hex code is yellow? (a) #ffff00 (b) #ff0000 (c) #ff00ff (d) #00ff00
- 34.🌈 Which colour of light is strongest in rgb(210, 107, 101)? (a) red (b) blue (c) green
- 35.🌈 Which hex code is bright green? (a) #0000ff (b) #ffff00 (c) #00ff00 (d) #ff00ff
- 36.🌈 Which colour of light is strongest in rgb(158, 33, 4)? (a) blue (b) green (c) red
- 37.🌈 In #0f0000 the red part is the hex number 0f. What is it as a normal number?
- 38.🌈 In #0000b9 the blue part is the hex number b9. What is it as a normal number?
- 39.🌈 In #00008b the blue part is the hex number 8b. What is it as a normal number?
- 40.🌈 Which hex code is cyan? (a) #00ff00 (b) #ffff00 (c) #0000ff (d) #00ffff
Answer key
- 3
- #ff00ff
- #ffffff
- white
- 45
- blue
- F
- cyan
- green
- white
- black
- blue
- red
- 244
- red
- 10
- red
- red
- #000000
- blue
- #ff0000
- red
- blue
- blue
- green
- cyan
- bright green
- bright green
- yellow
- green
- magenta
- red
- #ffff00
- red
- #00ff00
- red
- 15
- 185
- 139
- #00ffff
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids