Skip to content

Commit

Permalink
refactor: replace let with const (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
ximex authored Sep 24, 2024
1 parent 40387a0 commit 45490df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/color-convert/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export const rgbStringToHsva = rgbaStringToHsva;

/** Converts an RGBA color plus alpha transparency to hex */
export const rgbaToHex = ({ r, g, b }: RgbaColor): string => {
let bin = (r << 16) | (g << 8) | b;
const bin = (r << 16) | (g << 8) | b;
return `#${((h) => new Array(7 - h.length).join('0') + h)(bin.toString(16))}`;
};

Expand Down

0 comments on commit 45490df

Please sign in to comment.