Skip to content
Calcapedia
Print as
Number of problems

In the print window, choose “Save as PDF” as the printer (or print it on paper). Seed 1 rebuilds this exact sheet.

Showing 10 problems, seed 1.

Color Code worksheet

Grades 8–9

Solve each problem and show your work. Round answers to 2 decimal places where needed.

  1. Problem 1.
    • Convert from: RGB
    • Red: 60
    • Green: 130
    • Blue: 250

    Find: HEX

  2. Problem 2.
    • Convert from: RGB
    • Red: 46
    • Green: 120
    • Blue: 180

    Find: HEX

  3. Problem 3.
    • Convert from: HSL
    • Hue: 200 °
    • Saturation: 78%
    • Lightness: 44%

    Find: HEX

  4. Problem 4.
    • Convert from: HSL
    • Hue: 175 °
    • Saturation: 70%
    • Lightness: 50%

    Find: HEX

  5. Problem 5.
    • Convert from: HSL
    • Hue: 300 °
    • Saturation: 55%
    • Lightness: 55%

    Find: HEX

  6. Problem 6.
    • Convert from: HSL
    • Hue: 240 °
    • Saturation: 66%
    • Lightness: 50%

    Find: HEX

  7. Problem 7.
    • Convert from: RGB
    • Red: 64
    • Green: 115
    • Blue: 200

    Find: HEX

  8. Problem 8.
    • Convert from: HEX
    • HEX code: #1A1BD4

    Find: RGB

  9. Problem 9.
    • Convert from: HSL
    • Hue: 200 °
    • Saturation: 60%
    • Lightness: 60%

    Find: HEX

  10. Problem 10.
    • Convert from: HEX
    • HEX code: #6A5BD8

    Find: RGB

Answer key: Color Code worksheet

  1. 1. HEX: #3C82FA

    1. Write each channel in base 16, as HEX codes do: divide by 16 for the first digit and keep the remainder for the second

      60, 130, 250=3C 82 FA=#3C82FA
    2. Put the three hex pairs together after #

      HEX=#3C82FA
    3. Find how bright the color looks (its luminance L). Undo the screen's brightness curve, then weight red 0.2126, green 0.7152, blue 0.0722, since eyes see green as brightest

      0.2126×0.0452+0.7152×0.2232+0.0722×0.956=0.2383
    4. Compare with white, whose luminance is 1. Add 0.05 to both and divide the lighter by the darker

      1.050.2383+0.05=3.64
    5. Compare with black, whose luminance is 0, the same way

      0.2383+0.050.05=5.77
  2. 2. HEX: #2E78B4

    1. Write each channel in base 16, as HEX codes do: divide by 16 for the first digit and keep the remainder for the second

      46, 120, 180=2E 78 B4=#2E78B4
    2. Put the three hex pairs together after #

      HEX=#2E78B4
    3. Find how bright the color looks (its luminance L). Undo the screen's brightness curve, then weight red 0.2126, green 0.7152, blue 0.0722, since eyes see green as brightest

      0.2126×0.0273+0.7152×0.1878+0.0722×0.4564=0.1731
    4. Compare with white, whose luminance is 1. Add 0.05 to both and divide the lighter by the darker

      1.050.1731+0.05=4.71
    5. Compare with black, whose luminance is 0, the same way

      0.1731+0.050.05=4.46
  3. 3. HEX: #198DC8

    1. Find the chroma C, how far the strongest channel is from the weakest. It uses lightness L and saturation S as fractions

      (1−|2×0.44−1|)×0.78=0.6864
    2. Find X, the middle channel, from the hue H. Also find m, the amount that lifts every channel to the right lightness

      X = 0.4576, m = 0.0968
    3. Hue 200° falls in the 180°–240° slice of the color wheel. That sets which channel gets C, X and 0. Add m to each, then multiply by 255 for the 0 to 255 scale

      (R, G, B)=(25, 141, 200)
    4. Write each channel in base 16, as HEX codes do: divide by 16 for the first digit and keep the remainder for the second

      25, 141, 200=19 8D C8=#198DC8
    5. Put the three hex pairs together after #

      HEX=#198DC8
    6. Find how bright the color looks (its luminance L). Undo the screen's brightness curve, then weight red 0.2126, green 0.7152, blue 0.0722, since eyes see green as brightest

      0.2126×0.0097+0.7152×0.2664+0.0722×0.5776=0.2343
    7. Compare with white, whose luminance is 1. Add 0.05 to both and divide the lighter by the darker

      1.050.2343+0.05=3.69
    8. Compare with black, whose luminance is 0, the same way

      0.2343+0.050.05=5.69
  4. 4. HEX: #26D9CA

    1. Find the chroma C, how far the strongest channel is from the weakest. It uses lightness L and saturation S as fractions

      (1−|2×0.5−1|)×0.7=0.7
    2. Find X, the middle channel, from the hue H. Also find m, the amount that lifts every channel to the right lightness

      X = 0.6417, m = 0.15
    3. Hue 175° falls in the 120°–180° slice of the color wheel. That sets which channel gets C, X and 0. Add m to each, then multiply by 255 for the 0 to 255 scale

      (R, G, B)=(38, 217, 202)
    4. Write each channel in base 16, as HEX codes do: divide by 16 for the first digit and keep the remainder for the second

      38, 217, 202=26 D9 CA=#26D9CA
    5. Put the three hex pairs together after #

      HEX=#26D9CA
    6. Find how bright the color looks (its luminance L). Undo the screen's brightness curve, then weight red 0.2126, green 0.7152, blue 0.0722, since eyes see green as brightest

      0.2126×0.0194+0.7152×0.6939+0.0722×0.5906=0.543
    7. Compare with white, whose luminance is 1. Add 0.05 to both and divide the lighter by the darker

      1.050.543+0.05=1.77
    8. Compare with black, whose luminance is 0, the same way

      0.543+0.050.05=11.86
  5. 5. HEX: #CB4DCB

    1. Find the chroma C, how far the strongest channel is from the weakest. It uses lightness L and saturation S as fractions

      (1−|2×0.55−1|)×0.55=0.495
    2. Find X, the middle channel, from the hue H. Also find m, the amount that lifts every channel to the right lightness

      X = 0.495, m = 0.3025
    3. Hue 300° falls in the 300°–360° slice of the color wheel. That sets which channel gets C, X and 0. Add m to each, then multiply by 255 for the 0 to 255 scale

      (R, G, B)=(203, 77, 203)
    4. Write each channel in base 16, as HEX codes do: divide by 16 for the first digit and keep the remainder for the second

      203, 77, 203=CB 4D CB=#CB4DCB
    5. Put the three hex pairs together after #

      HEX=#CB4DCB
    6. Find how bright the color looks (its luminance L). Undo the screen's brightness curve, then weight red 0.2126, green 0.7152, blue 0.0722, since eyes see green as brightest

      0.2126×0.5972+0.7152×0.0742+0.0722×0.5972=0.2232
    7. Compare with white, whose luminance is 1. Add 0.05 to both and divide the lighter by the darker

      1.050.2232+0.05=3.84
    8. Compare with black, whose luminance is 0, the same way

      0.2232+0.050.05=5.46
  6. 6. HEX: #2B2BD4

    1. Find the chroma C, how far the strongest channel is from the weakest. It uses lightness L and saturation S as fractions

      (1−|2×0.5−1|)×0.66=0.66
    2. Find X, the middle channel, from the hue H. Also find m, the amount that lifts every channel to the right lightness

      X = 0, m = 0.17
    3. Hue 240° falls in the 240°–300° slice of the color wheel. That sets which channel gets C, X and 0. Add m to each, then multiply by 255 for the 0 to 255 scale

      (R, G, B)=(43, 43, 212)
    4. Write each channel in base 16, as HEX codes do: divide by 16 for the first digit and keep the remainder for the second

      43, 43, 212=2B 2B D4=#2B2BD4
    5. Put the three hex pairs together after #

      HEX=#2B2BD4
    6. Find how bright the color looks (its luminance L). Undo the screen's brightness curve, then weight red 0.2126, green 0.7152, blue 0.0722, since eyes see green as brightest

      0.2126×0.0242+0.7152×0.0242+0.0722×0.6584=0.0699
    7. Compare with white, whose luminance is 1. Add 0.05 to both and divide the lighter by the darker

      1.050.0699+0.05=8.75
    8. Compare with black, whose luminance is 0, the same way

      0.0699+0.050.05=2.4
  7. 7. HEX: #4073C8

    1. Write each channel in base 16, as HEX codes do: divide by 16 for the first digit and keep the remainder for the second

      64, 115, 200=40 73 C8=#4073C8
    2. Put the three hex pairs together after #

      HEX=#4073C8
    3. Find how bright the color looks (its luminance L). Undo the screen's brightness curve, then weight red 0.2126, green 0.7152, blue 0.0722, since eyes see green as brightest

      0.2126×0.0513+0.7152×0.1714+0.0722×0.5776=0.1752
    4. Compare with white, whose luminance is 1. Add 0.05 to both and divide the lighter by the darker

      1.050.1752+0.05=4.66
    5. Compare with black, whose luminance is 0, the same way

      0.1752+0.050.05=4.5
  8. 8. RGB: rgb(26, 27, 212)

    1. Red: the hex pair 1A is 1 sixteens plus A ones (A = 10 … F = 15)

      1A=1×16+10=26
    2. Green: the hex pair 1B is 1 sixteens plus B ones (A = 10 … F = 15)

      1B=1×16+11=27
    3. Blue: the hex pair D4 is D sixteens plus 4 ones (A = 10 … F = 15)

      D4=13×16+4=212
    4. Put the three channels together

      RGB=rgb(26, 27, 212)
    5. Find how bright the color looks (its luminance L). Undo the screen's brightness curve, then weight red 0.2126, green 0.7152, blue 0.0722, since eyes see green as brightest

      0.2126×0.0103+0.7152×0.011+0.0722×0.6584=0.0576
    6. Compare with white, whose luminance is 1. Add 0.05 to both and divide the lighter by the darker

      1.050.0576+0.05=9.76
    7. Compare with black, whose luminance is 0, the same way

      0.0576+0.050.05=2.15
  9. 9. HEX: #5CADD6

    1. Find the chroma C, how far the strongest channel is from the weakest. It uses lightness L and saturation S as fractions

      (1−|2×0.6−1|)×0.6=0.48
    2. Find X, the middle channel, from the hue H. Also find m, the amount that lifts every channel to the right lightness

      X = 0.32, m = 0.36
    3. Hue 200° falls in the 180°–240° slice of the color wheel. That sets which channel gets C, X and 0. Add m to each, then multiply by 255 for the 0 to 255 scale

      (R, G, B)=(92, 173, 214)
    4. Write each channel in base 16, as HEX codes do: divide by 16 for the first digit and keep the remainder for the second

      92, 173, 214=5C AD D6=#5CADD6
    5. Put the three hex pairs together after #

      HEX=#5CADD6
    6. Find how bright the color looks (its luminance L). Undo the screen's brightness curve, then weight red 0.2126, green 0.7152, blue 0.0722, since eyes see green as brightest

      0.2126×0.107+0.7152×0.4179+0.0722×0.6724=0.3702
    7. Compare with white, whose luminance is 1. Add 0.05 to both and divide the lighter by the darker

      1.050.3702+0.05=2.5
    8. Compare with black, whose luminance is 0, the same way

      0.3702+0.050.05=8.4
  10. 10. RGB: rgb(106, 91, 216)

    1. Red: the hex pair 6A is 6 sixteens plus A ones (A = 10 … F = 15)

      6A=6×16+10=106
    2. Green: the hex pair 5B is 5 sixteens plus B ones (A = 10 … F = 15)

      5B=5×16+11=91
    3. Blue: the hex pair D8 is D sixteens plus 8 ones (A = 10 … F = 15)

      D8=13×16+8=216
    4. Put the three channels together

      RGB=rgb(106, 91, 216)
    5. Find how bright the color looks (its luminance L). Undo the screen's brightness curve, then weight red 0.2126, green 0.7152, blue 0.0722, since eyes see green as brightest

      0.2126×0.1441+0.7152×0.1046+0.0722×0.6867=0.155
    6. Compare with white, whose luminance is 1. Add 0.05 to both and divide the lighter by the darker

      1.050.155+0.05=5.12
    7. Compare with black, whose luminance is 0, the same way

      0.155+0.050.05=4.1