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 is #0000ff? (a) magenta (b) yellow (c) blue (d) black
- 2.🌈 In #002d00 the green part is the hex number 2d. What is it as a normal number?
- 3.🌈 Which colour is rgb(0, 255, 0)? (a) magenta (b) blue (c) yellow (d) bright green
- 4.🌈 Which hex code is bright green? (a) #ff00ff (b) #ff0000 (c) #00ff00 (d) #0000ff
- 5.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 4 (c) 6 (d) 2
- 6.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) yellow (c) blue (d) magenta
- 7.🌈 Which colour is #ff00ff? (a) bright green (b) magenta (c) blue (d) cyan
- 8.🌈 Which colour is #ffffff? (a) black (b) magenta (c) white (d) yellow
- 9.🌈 Which colour of light is strongest in rgb(111, 123, 181)? (a) blue (b) green (c) red
- 10.🌈 In #eb0000 the red part is the hex number eb. What is it as a normal number?
- 11.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 99 (d) 255
- 12.🌈 In #00ca00 the green part is the hex number ca. What is it as a normal number?
- 13.🌈 In #000019 the blue part is the hex number 19. What is it as a normal number?
- 14.🌈 Which hex code is magenta? (a) #0000ff (b) #00ff00 (c) #000000 (d) #ff00ff
- 15.🌈 In #002b00 the green part is the hex number 2b. What is it as a normal number?
- 16.🌈 Which colour is #ff0000? (a) bright green (b) yellow (c) red (d) cyan
- 17.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) blue (d) green
- 18.🌈 In #bc0000 the red part is the hex number bc. What is it as a normal number?
- 19.🌈 Which colour is #ffff00? (a) black (b) yellow (c) white (d) red
- 20.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) black (c) blue (d) yellow
- 21.🌈 Which colour is rgb(255, 0, 0)? (a) white (b) red (c) bright green (d) black
- 22.🌈 Which hex code is blue? (a) #ffff00 (b) #0000ff (c) #00ff00 (d) #000000
- 23.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) F (d) Z
- 24.🌈 Which colour of light is strongest in rgb(177, 41, 71)? (a) blue (b) red (c) green
- 25.🌈 In #750000 the red part is the hex number 75. What is it as a normal number?
- 26.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) red (d) blue
- 27.🌈 Which colour of light is strongest in rgb(93, 231, 92)? (a) blue (b) red (c) green
- 28.🌈 Which hex code is white? (a) #ffffff (b) #00ffff (c) #00ff00 (d) #000000
- 29.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) white (c) cyan (d) black
- 30.🌈 Which colour of light is strongest in rgb(38, 23, 175)? (a) green (b) red (c) blue
- 31.🌈 In #d00000 the red part is the hex number d0. What is it as a normal number?
- 32.🌈 Which colour is #00ff00? (a) yellow (b) bright green (c) blue (d) white
- 33.🌈 Which colour of light is strongest in rgb(14, 99, 163)? (a) red (b) blue (c) green
- 34.🌈 Which colour is #000000? (a) blue (b) red (c) cyan (d) black
- 35.🌈 Which colour of light is strongest in rgb(238, 137, 95)? (a) blue (b) green (c) red
- 36.🌈 Which colour of light is strongest in rgb(3, 221, 50)? (a) red (b) green (c) blue
- 37.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) cyan (c) yellow (d) magenta
- 38.🌈 In #740000 the red part is the hex number 74. What is it as a normal number?
- 39.🌈 Which colour of light is strongest in rgb(34, 222, 128)? (a) blue (b) red (c) green
- 40.🌈 Which colour is #00ffff? (a) blue (b) cyan (c) black (d) magenta
Answer key
- blue
- 45
- bright green
- #00ff00
- 3
- yellow
- magenta
- white
- blue
- 235
- 255
- 202
- 25
- #ff00ff
- 43
- red
- red
- 188
- yellow
- black
- red
- #0000ff
- F
- red
- 117
- blue
- green
- #ffffff
- white
- blue
- 208
- bright green
- blue
- black
- red
- green
- cyan
- 116
- green
- cyan
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids