8000 Adding dark mode for pipeline diagram · Issue #26364 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

Adding dark mode for pipeline diagram #26364

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

Closed
solo-driven opened this issue May 14, 2023 · 5 comments
Closed

Adding dark mode for pipeline diagram #26364

solo-driven opened this issue May 14, 2023 · 5 comments
Assignees

Comments

@solo-driven
Copy link

Describe the workflow you want to enable

The current diagram truly hurts eyes when everything else in dark mode. It would be a very nice feature to add.
Screenshot 2023-05-14 100107

Describe your proposed solution

Currently I do it this way, but I bet there could have been a better way.

`
def display_dark(pipeline, text_color="#3bd5eb"):
replacements = {
"color: black": f"color: {text_color};",
"background-color: white": "background-color: transparent",
'class="sk-toggleable__label sk-toggleable__label-arrow"': 'class="sk-toggleable__label sk-toggleable__label-arrow" style="background-color: #222831;"',
"#696969;": "#e6e6e6;",
"#d4ebff;": "#1a1a1a;",
"background-color: #f0f8ff;": "background-color: #393e46",
"background-color: #d4ebff;": "background-color: #1a1a1a;",
"color: #e6e6e6;": "color: #b3b3b3;"
}

html = estimator_html_repr(pipeline)

for old, new in replacements.items():
    html = html.replace(old, new)
display(HTML(html))

`
Screenshot 2023-05-14 100143

Describe alternatives you've considered, if relevant

No response

Additional context

No response

@solo-driven solo-driven added Needs Triage Issue requires triage New Feature labels May 14, 2023
@Ruparani777
Copy link

Nice feature

@adrinjalali
Copy link
Member

Happy to see a PR for this feature.

@9Y5
Copy link
Contributor
9Y5 commented Jul 19, 2023

/take

@9Y5
Copy link
Contributor
9Y5 commented Jul 20, 2023

@adrinjalali @solo-driven hi please help review too if this suits your needs #26862 thanks!

@glemaitre
Copy link
Member

I'm closing this issue because we already have an improved theme adaptation for some IDE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants
0