@@ -3919,11 +3919,19 @@ <h3><a href="https://github.com/frappe/erpnext" target="_blank">ERPNext</a></h3>
39193919
39203920 tagCloudContainer . innerHTML = '' ;
39213921
3922- const minFontSize = 0.8 ;
3923- const maxFontSize = 0.8 ;
3922+ const minFontSize = 0.7 ;
3923+ const maxFontSize = 1.0 ;
39243924 const maxCount = Math . max ( ...Object . values ( categoryCounts ) ) ;
39253925 const minCount = Math . min ( ...Object . values ( categoryCounts ) ) ;
39263926
3927+ const getColor = ( count ) => {
3928+ if ( count >= maxCount * 0.8 ) return '#2c5282' ; // Dark blue for highest counts
3929+ if ( count >= maxCount * 0.6 ) return '#38a169' ; // Green for high counts
3930+ if ( count >= maxCount * 0.4 ) return '#805ad5' ; // Purple for medium counts
3931+ if ( count >= maxCount * 0.2 ) return '#d53f8c' ; // Pink for low counts
3932+ return '#718096' ; // Gray for lowest counts
3933+ } ;
3934+
39273935 Object . entries ( categoryCounts ) . forEach ( ( [ category , count ] ) => {
39283936 const weight = ( ( count - minCount ) / ( maxCount - minCount ) ) * ( maxFontSize - minFontSize ) + minFontSize ;
39293937
@@ -3933,7 +3941,8 @@ <h3><a href="https://github.com/frappe/erpnext" target="_blank">ERPNext</a></h3>
39333941 link . href = `#${ category } ` ;
39343942 link . textContent = category ;
39353943 link . style . fontSize = `${ weight } rem` ;
3936- link . style . color = `#105028` ;
3944+ // link.style.color = `#105028`;
3945+ link . style . color = getColor ( count ) ;
39373946 link . setAttribute ( 'data-weight' , count ) ;
39383947
39393948 listItem . appendChild ( link ) ;
0 commit comments