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 rgb(0, 255, 0)? (a) yellow (b) bright green (c) black (d) magenta
- 2.🌈 Which colour is rgb(255, 255, 0)? (a) black (b) magenta (c) white (d) yellow
- 3.🌈 Which colour is #0000ff? (a) cyan (b) bright green (c) magenta (d) blue
- 4.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 1000 (d) 99
- 5.🌈 In #4d0000 the red part is the hex number 4d. What is it as a normal number?
- 6.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) Z (d) G
- 7.🌈 In #a00000 the red part is the hex number a0. What is it as a normal number?
- 8.🌈 In #001100 the green part is the hex number 11. What is it as a normal number?
- 9.🌈 Which colour of light is strongest in rgb(166, 31, 13)? (a) blue (b) red (c) green
- 10.🌈 Which colour is #ff00ff? (a) cyan (b) blue (c) magenta (d) white
- 11.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) blue (d) black
- 12.🌈 Which colour of light is strongest in rgb(104, 115, 152)? (a) red (b) green (c) blue
- 13.🌈 Which colour is rgb(0, 255, 255)? (a) red (b) yellow (c) black (d) cyan
- 14.🌈 Which colour is #000000? (a) white (b) magenta (c) black (d) bright green
- 15.🌈 Which colour is rgb(255, 0, 255)? (a) cyan (b) black (c) blue (d) magenta
- 16.🌈 Which colour is rgb(0, 0, 255)? (a) white (b) cyan (c) blue (d) black
- 17.🌈 Which colour is #ffff00? (a) bright green (b) red (c) yellow (d) blue
- 18.🌈 Which colour of light is strongest in rgb(91, 177, 134)? (a) red (b) blue (c) green
- 19.🌈 In #000033 the blue part is the hex number 33. What is it as a normal number?
- 20.🌈 In #410000 the red part is the hex number 41. What is it as a normal number?
- 21.🌈 In #0a0000 the red part is the hex number 0a. What is it as a normal number?
- 22.🌈 Which hex code is blue? (a) #000000 (b) #00ff00 (c) #ffff00 (d) #0000ff
- 23.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) green (d) red
- 24.🌈 Which colour is rgb(255, 255, 255)? (a) red (b) white (c) cyan (d) blue
- 25.🌈 Which colour of light is strongest in rgb(1, 166, 76)? (a) green (b) red (c) blue
- 26.🌈 In #0000c3 the blue part is the hex number c3. What is it as a normal number?
- 27.🌈 Which hex code is bright green? (a) #ffff00 (b) #0000ff (c) #00ff00 (d) #ffffff
- 28.🌈 Which colour of light is strongest in rgb(111, 180, 120)? (a) red (b) green (c) blue
- 29.🌈 In #af0000 the red part is the hex number af. What is it as a normal number?
- 30.🌈 Which colour is #ff0000? (a) red (b) magenta (c) yellow (d) black
- 31.🌈 Which hex code is magenta? (a) #00ff00 (b) #000000 (c) #ff00ff (d) #ff0000
- 32.🌈 In #2c0000 the red part is the hex number 2c. What is it as a normal number?
- 33.🌈 Which hex code is white? (a) #ffffff (b) #ffff00 (c) #0000ff (d) #ff0000
- 34.🌈 In #500000 the red part is the hex number 50. What is it as a normal number?
- 35.🌈 In #00b400 the green part is the hex number b4. What is it as a normal number?
- 36.🌈 Which colour of light is strongest in rgb(51, 39, 174)? (a) red (b) blue (c) green
- 37.🌈 Which colour is #ffffff? (a) magenta (b) bright green (c) black (d) white
- 38.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) red (c) black (d) yellow
- 39.🌈 Which colour of light is strongest in rgb(51, 182, 43)? (a) green (b) red (c) blue
- 40.🌈 In #008100 the green part is the hex number 81. What is it as a normal number?
Answer key
- bright green
- yellow
- blue
- 255
- 77
- F
- 160
- 17
- red
- magenta
- red
- blue
- cyan
- black
- magenta
- blue
- yellow
- green
- 51
- 65
- 10
- #0000ff
- blue
- white
- green
- 195
- #00ff00
- green
- 175
- red
- #ff00ff
- 44
- #ffffff
- 80
- 180
- blue
- white
- red
- green
- 129
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids