UNPKG
mewcard
Version:
latest (1.8.3)
1.8.3
1.8.2
1.8.1
1.8.0
1.7.9
1.7.5
1.7.3
1.7.2
1.7.1
1.7.0
1.6.9
1.6.8
1.6.7
1.6.6
1.6.5
1.6.4
1.6.3
1.6.2
1.6.1
1.6.0
1.5.9
1.5.8
1.5.7
1.5.6
1.5.5
1.5.4
1.5.3
1.5.2
Experience your Discord bot's music in a visual format.
github.com/lrmn7/mewcard
lrmn7/mewcard
mewcard
/
build
/
functions
/
rgbToHex.js
14 lines
(11 loc)
•
330 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
async
function
rgbToHex
(
r, g, b
) {
const
toHex
= (
value
) => {
const
hex = value.
toString
(
16
);
return
hex.
length
===
1
?
'0'
+ hex : hex; };
const
hexR =
toHex
(r);
const
hexG =
toHex
(g);
const
hexB =
toHex
(b);
return
`#
${hexR}
${hexG}
${hexB}
`
; }
module
.
exports
= { rgbToHex };