File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import { ComfyNodeDefImpl, useNodeDefStore } from '@/stores/nodeDefStore'
1212import { useSettingStore } from '@/stores/settingStore'
1313import { useColorPaletteStore } from '@/stores/workspace/colorPaletteStore'
1414import { NodeBadgeMode } from '@/types/nodeSource'
15+ import { adjustColor } from '@/utils/colorUtil'
1516
1617/**
1718 * Add LGraphBadge to LGraphNode based on settings.
@@ -96,21 +97,28 @@ export const useNodeBadge = () => {
9697
9798 if ( node . constructor . nodeData ?. api_node ) {
9899 const creditsBadge = computed ( ( ) => {
100+ // Use dynamic background color based on the theme
101+ const isLightTheme =
102+ colorPaletteStore . completedActivePalette . light_theme
99103 return new LGraphBadge ( {
100104 text : '' ,
101105 iconOptions : {
102106 unicode : '\ue96b' ,
103107 fontFamily : 'PrimeIcons' ,
104- color : '#FABC25' ,
105- bgColor : '#353535' ,
108+ color : isLightTheme
109+ ? adjustColor ( '#FABC25' , { lightness : 0.5 } )
110+ : '#FABC25' ,
111+ bgColor : isLightTheme
112+ ? adjustColor ( '#654020' , { lightness : 0.5 } )
113+ : '#654020' ,
106114 fontSize : 8
107115 } ,
108116 fgColor :
109117 colorPaletteStore . completedActivePalette . colors . litegraph_base
110118 . BADGE_FG_COLOR ,
111- bgColor :
112- colorPaletteStore . completedActivePalette . colors . litegraph_base
113- . BADGE_BG_COLOR
119+ bgColor : isLightTheme
120+ ? adjustColor ( '#8D6932' , { lightness : 0.5 } )
121+ : '#8D6932'
114122 } )
115123 } )
116124
You can’t perform that action at this time.
0 commit comments