1234567891011121314151617 |
- export function colorForUUID(iStrUUID)
- {
- return '#' + Util.zeroFill(( Math.abs( parseInt( iStrUUID.replace( "-", "" ), 16 )) % 16777215 ) & 0x1F0F3F , 6, '0' ).toString( 16 );
- }
-
- export function zeroFill( number, width, padchar )
- {
- var pad_char = typeof padchar !== 'undefined' ? padchar : '0';
- var pad = new Array(1 + width).join(pad_char);
- return ( pad + number ).slice(-pad.length);
- }
-
- export function strLPad( i_string, i_charcount, i_padchar )
- {
- var pad = new Array(1 + i_charcount).join(i_padchar);
- return (pad + i_string).slice(-pad.length);
- }
|