Skip to content

Commit

Permalink
fix: alpha 0 colors
Browse files Browse the repository at this point in the history
  • Loading branch information
jeronimoek committed Nov 3, 2023
1 parent acc5b1c commit f87f81f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ export function parseColorString(initialColor: string) {
try {
const colorRaw = initialColor.toLocaleLowerCase();
const color = new ColorTranslatorExtended(colorRaw);
const { r, g, b, alpha = 1 } = color.rgb;
return new vscode.Color(r / 255, g / 255, b / 255, alpha || 1);
const { r, g, b, alpha } = color.rgb;
return new vscode.Color(r / 255, g / 255, b / 255, alpha ?? 1);
} catch (error) {
return null;
}
Expand Down

0 comments on commit f87f81f

Please sign in to comment.