Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: User selectable colors for bypassed and muted nodes #964

Closed
1 task done
JorgeR81 opened this issue Sep 24, 2024 · 3 comments
Closed
1 task done
Labels
enhancement New feature or request

Comments

@JorgeR81
Copy link

JorgeR81 commented Sep 24, 2024

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What would your feature do ?

I have a lot of bypassed nodes on my workflows, and I find all the pink colors too distracting.

I would like to use a dark color ( similar to the muted nodes ).

But the best way to deal with this is probably to let the user select the color for each use case, since everyone has its own preferences.


If this is too complex, just and an option to switch the current colors:

  • dark = bypassed
  • pink = muted

Proposed workflow

.

Additional information

No response

@mcmonkey4eva
Copy link
Contributor

The correct way to do this is probably via the Themes system that lets you customize colors in general, which internally maps to the ColorPalette.ts classes, however it's currently not designed in a way that's particular amenable to being extended and used fully.

Notably bypass/mute is implemented inside app.ts, and ColorPalette.ts requires app.ts to be ready at import time, ie app.ts cannot import ColorPalette.ts to actually read color data from it (ow). This happens because ColorPalette is treated as an extension, not a core component, meaning it uses app.registerExtension inside itself.

Also it's organized into 'comfy base' and 'litegraph base', neither of which are correct for "new color" (albeit either can happily used despite technical incorrectness, or just make a new category)

So some reorganization of this code is needed before it can be used to fully allow free customization of colors.
Or, we could define the colors as just random variables somewhere, and let the extension update them, which is in line with how the current code for it is implemented, but is very much a hack.

@mcmonkey4eva
Copy link
Contributor

PR for the hacky version #993

Green bypass to demonstrate
371061017-09416755-e0fc-4205-b5b9-fd304a4eff17

Only did bypass atm - currently muted notes just go transparent and don't alter color, so allowing coloring them would need to be done separately

@JorgeR81
Copy link
Author

JorgeR81 commented Sep 26, 2024

If you're planning a more robust implementation for this:

Why not make bypassed / muted states independent from color ?
Maybe just add some transparency and icons for bypassed / muted states, similar to the pin icon ( Comfy-Org/litegraph.js#152 )

Then the user could also select to have no color at all for these states.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants