export class GifColor { public r : number ; public g : number ; public b : number ; /**
     * GifColor
     */ public constructor ( r , g , b ) { this . r = r ; this . g = g ; this . b = b ; } /**
     * TODO:
    static valueOf(color:string) {
    }
     */ public static createColorTable ( colors ) { const numbers = [ ] ; for ( let i = 1 ; i <= 8 ; ++ i ) { const d = ( i << 1 ) - colors . length ; for ( let j = 0 ; j < d ; ++ j ) { colors . push ( new GifColor ( 255 , 255 , 255 ) ) ; } } colors . forEach ( ( color ) => { numbers . push ( color . r ) ; numbers . push ( color . g ) ; numbers . push ( color . b ) ; } ) ; return new Uint8Array ( numbers ) ; } }