@@ -242,28 +242,31 @@ function formatQuotaLines(
242242 . map ( ( quota ) => {
243243 const usedRatio = Math . max ( 0 , Math . min ( quota . used / quota . limit , 1 ) ) ;
244244 return {
245- label : ` ${ quota . label . toLowerCase ( ) } :` ,
245+ labelName : quota . label . toLowerCase ( ) ,
246246 percent : `${ Math . round ( usedRatio * 100 ) } %` ,
247247 reset : formatResetHint ( quota . resetHint ) ,
248248 ratio : usedRatio ,
249249 } ;
250250 } ) ;
251251 if ( rows . length === 0 ) return [ ] ;
252252
253- const labelColWidth = Math . max ( ...rows . map ( ( r ) => visibleWidth ( r . label ) ) ) ;
253+ const labelNameWidth = Math . max ( ...rows . map ( ( r ) => visibleWidth ( r . labelName ) ) ) ;
254254 const percentColWidth = Math . max ( ...rows . map ( ( r ) => visibleWidth ( r . percent ) ) ) ;
255255 const resetColWidth = Math . max ( ...rows . map ( ( r ) => visibleWidth ( r . reset ) ) ) ;
256256 const gap = 3 ;
257- const blockWidth = labelColWidth + gap + percentColWidth + gap + resetColWidth ;
257+ const blockWidth = labelNameWidth + 1 + gap + percentColWidth + gap + resetColWidth ;
258258
259259 const lines : string [ ] = [ ] ;
260260 for ( const row of rows ) {
261- const numberColor = chalk . hex ( hslToHex ( Math . round ( ( 1 - row . ratio ) * 120 ) , 80 , 40 ) ) ;
261+ // Subtle gradient: fully green at 0 %, fully red at 100 %, desaturated.
262+ const numberColor = chalk . hex ( hslToHex ( Math . round ( ( 1 - row . ratio ) * 120 ) , 55 , 50 ) ) ;
262263 const content =
263- row . label . padEnd ( labelColWidth + gap ) +
264+ row . labelName . padEnd ( labelNameWidth ) +
265+ ':' +
266+ ' ' . repeat ( gap ) +
264267 numberColor ( row . percent . padStart ( percentColWidth ) ) +
265268 ' ' . repeat ( gap ) +
266- chalk . hex ( colors . text ) ( row . reset . padStart ( resetColWidth ) ) ;
269+ chalk . hex ( colors . text ) ( row . reset . padEnd ( resetColWidth ) ) ;
267270 const leftPad = Math . max ( 0 , width - blockWidth ) ;
268271 lines . push ( truncateToWidth ( ' ' . repeat ( leftPad ) + content , width ) ) ;
269272 }
0 commit comments