Skip to content

Commit

Permalink
change default group color
Browse files Browse the repository at this point in the history
  • Loading branch information
6174 committed Mar 21, 2024
1 parent ad96b0c commit feaf507
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions packages/common/types/comfy-node.types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NodeProps, XYPosition } from "reactflow";
import { ComfyUIID, FlowPrimitiveType, Input, PreviewImage } from "./comfy-props.types";
import { Widget, WidgetKey } from "./comfy-widget.types"
import { ComfyUIID, FlowPrimitiveType, Input, PreviewImage, SDNODE_DEFAULT_COLOR } from "./comfy-props.types";
import { NODE_GROUP, Widget, WidgetKey } from "./comfy-widget.types"
import { ComfyUIWorkflowNodeInput, ComfyUIWorkflowNodeOutput } from "./comfy-props.types";
import { SubflowNodeWithControl } from "./comflowy-controlboard.types";
import { PersistedFullWorkflow } from "./comfy-workflow.types";
Expand Down Expand Up @@ -121,12 +121,21 @@ export const SDNode = {
slot_index: index
}
});
return {
const ret = {
widget: widget.name,
fields: Widget.getDefaultFields(widget),
inputs: inputs,
color: SDNODE_DEFAULT_COLOR.color,
bgcolor: SDNODE_DEFAULT_COLOR.bgcolor,
outputs: outputs,
}

if (widget.name === NODE_GROUP) {
ret.color = '#2AAFF7';
ret.bgcolor = '#21262A';
}

return ret;
},
newPrimitiveNode(primitiveType: FlowPrimitiveType): SDNode {
return {
Expand Down

0 comments on commit feaf507

Please sign in to comment.