@@ -522,19 +522,19 @@ function cstr_by_ptr(mem_buffer, ptr) {
522522}
523523
524524function 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 ;
530530}
531531
532532function 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 ;
538538}
539539
540540function getColorFromMemory ( buffer , color_ptr ) {
0 commit comments