extendHex
Extends a 3-digit color code to a 6-digit color code.
- Use
Array.prototype.map()
,String.prototype.split()
andArray.prototype.join()
to join the mapped array for converting a 3-digit RGB notated hexadecimal color-code to the 6-digit form. Array.prototype.slice()
is used to remove#
from string start since it's added once.