@@ -522,19 +522,19 @@ function cstr_by_ptr(mem_buffer, ptr) {
522
522
}
523
523
524
524
function color_hex_unpacked ( r , g , b , a ) {
525
- r = r . toString ( 16 ) . padStart ( 2 , "0" ) ;
526
- g = g . toString ( 16 ) . padStart ( 2 , "0" ) ;
527
- b = b . toString ( 16 ) . padStart ( 2 , "0" ) ;
528
- a = a . toString ( 16 ) . padStart ( 2 , "0" ) ;
529
- return "#" + r + g + b + a ;
525
+ r = r . toString ( 16 ) . padStart ( 2 , '0' ) ;
526
+ g = g . toString ( 16 ) . padStart ( 2 , '0' ) ;
527
+ b = b . toString ( 16 ) . padStart ( 2 , '0' ) ;
528
+ a = a . toString ( 16 ) . padStart ( 2 , '0' ) ;
529
+ return "#" + r + g + b + a ;
530
530
}
531
531
532
532
function color_hex ( color ) {
533
- const r = ( ( color >> ( 0 * 8 ) ) & 0xff ) . toString ( 16 ) . padStart ( 2 , "0" ) ;
534
- const g = ( ( color >> ( 1 * 8 ) ) & 0xff ) . toString ( 16 ) . padStart ( 2 , "0" ) ;
535
- const b = ( ( color >> ( 2 * 8 ) ) & 0xff ) . toString ( 16 ) . padStart ( 2 , "0" ) ;
536
- const a = ( ( color >> ( 3 * 8 ) ) & 0xff ) . toString ( 16 ) . padStart ( 2 , "0" ) ;
537
- return "#" + r + g + b + a ;
533
+ const r = ( ( color >> ( 0 * 8 ) ) & 0xff ) . toString ( 16 ) . padStart ( 2 , '0' ) ;
534
+ const g = ( ( color >> ( 1 * 8 ) ) & 0xff ) . toString ( 16 ) . padStart ( 2 , '0' ) ;
535
+ const b = ( ( color >> ( 2 * 8 ) ) & 0xff ) . toString ( 16 ) . padStart ( 2 , '0' ) ;
536
+ const a = ( ( color >> ( 3 * 8 ) ) & 0xff ) . toString ( 16 ) . padStart ( 2 , '0' ) ;
537
+ return "#" + r + g + b + a ;
538
538
}
539
539
540
540
function getColorFromMemory ( buffer , color_ptr ) {
0 commit comments