const extendHex = (shortHex: string) =>
'#' +
shortHex
.slice(shortHex.startsWith('#') ? 1 : 0)
.split('')
.map(x => x + x)
.join('');
Extend hex color
Extends a 3-digit color code to a 6-digit color code.
0 Comments
Add Comment
Log in to add a comment