Skip to content

Commit

Permalink
fix: Support for rgba colors
Browse files Browse the repository at this point in the history
  • Loading branch information
RomRider committed Feb 11, 2021
1 parent 8aa6434 commit 7ecfafd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ export function computeColor(color: string): string {
} else if (color.substring(0, 3) === 'var') {
return new TinyColor(
window.getComputedStyle(document.documentElement).getPropertyValue(color.substring(4).slice(0, -1)).trim(),
).toHexString();
).toHex8String();
} else {
return new TinyColor(color).toHexString();
return new TinyColor(color).toHex8String();
}
}

Expand Down

0 comments on commit 7ecfafd

Please sign in to comment.