Skip to content

Instantly share code, notes, and snippets.

View aneudy1702's full-sized avatar

Aneudy Abreu aneudy1702

View GitHub Profile
@aneudy1702
aneudy1702 / averageBetweenTwoHexColors.js
Last active August 1, 2019 18:31
A function that takes 2 colors as arguments and returns the average color.
/**
*
Write a function that takes 2 colors as arguments and returns the average color.
- The parameters will be two 6-digit hexadecimal strings. This does not need to be validated.
- The return value should be a 6-digit hexadecimal string.
- The hexadecimal strings represent colors in RGB, much like in CSS.
- The average color is to be determined by taking the arithmetic mean for each component: red, green and blue.
**/
/**