Skip to content

Commit

Permalink
fix: color parser utils
Browse files Browse the repository at this point in the history
  • Loading branch information
ddiu8081 committed Sep 24, 2022
1 parent 58cbc0c commit a4b0fed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/color.ts
@@ -1,4 +1,4 @@
export const intToColorHex = (int: number) => {
const hex = int.toString(16)
return hex.length === 1 ? `#0${hex}` : `#${hex}`
return hex.length === 5 ? `#0${hex}` : `#${hex}`
}

1 comment on commit a4b0fed

@tymon42
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

太酷了哥

Please sign in to comment.