UNPKG
io3fix
Version:
latest (1.1.8-b)
1.2.1
1.1.8
1.1.8-b
toolkit for interior apps
3d.io
archilogic-com/3dio-js
io3fix
/
src
/
utils
/
color
/
rgb-to-hex.js
3 lines
•
190 B
JavaScript
View Raw
1
2
3
export
default
function
rgbToHex
(
array
) {
return
"#"
+ ((
1
<<
24
) + (
Math
.
round
(array[
0
]*
255
) <<
16
) + (
Math
.
round
(array[
1
]*
255
) <<
8
) + (
Math
.
round
(array[
2
]*
255
))).
toString
(
16
).
slice
(
1
) }