Commit b6ef36d8 authored by Zéfling's avatar Zéfling 🎨
Browse files

fix calculation when no alpha

parent 7ee6faea
......@@ -281,7 +281,7 @@ export class Coloration {
: matchHex[2][0] + matchHex[2][0] + matchHex[2][1] + matchHex[2][1] + matchHex[2][2] + matchHex[2][2];
const hexaAlpha = matchHex[4]
? matchHex[5]
: matchHex[3][1] + matchHex[3][1];
: (matchHex[3] ? matchHex[3][1] + matchHex[3][1] : undefined);
intColor = parseInt(hexaColor, 16);
alpha = hexaAlpha !== undefined ? parseInt(hexaAlpha, 16) / 256 : 1;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment