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

Dynamically change color of run outputs #504

Closed
ihs-nick opened this issue Oct 29, 2020 · 3 comments
Closed

Dynamically change color of run outputs #504

ihs-nick opened this issue Oct 29, 2020 · 3 comments
Assignees

Comments

@ihs-nick
Copy link
Contributor

When using the dark theme in jupyter, the text is white. This means that the colors chosen for run outputs are not highly contrasted with the text making it unreadable. Either colors should be assigned based on the theme choice, or the output colors should be chosen to contrast with white and black text. See what it looks like on dark theme below.
Screen Shot 2020-10-29 at 10 39 18 AM

@Hedingber Hedingber self-assigned this Oct 29, 2020
@Hedingber
Copy link
Contributor

Hi @ihs-nick
Thank you for reaching out !
Fixed this in #506
0.5.3 is about to be released this week and will have this fix
Closing

@ihs-nick
Copy link
Contributor Author

ihs-nick commented Nov 1, 2020

Hi Hedingber, thanks for putting this fix in. I was hoping it was going to be more trivial to read the jupyter theme from the environment. Since that is not easy, I was thinking about the long term implications of the choice to try to use a single color.

There are many possible themes that a user could choose, and there are many platforms you may choose to support in the long run: pycharm, visual studio, etc.. What if we adopted the approach of visualization libraries like plotly and let users set their theme with an intelligent default? This would allow users to submit new themes for their specific use cases too. Here is what I'm referring to: https://plotly.com/python/templates/

So users would specify:
template = "mlrun_dark"
run_local(<arguments>, template=template)

What are your thoughts on this?

@Hedingber
Copy link
Contributor

Hedingber commented Nov 1, 2020

Hi @ihs-nick,
I was hoping as well, but couldn't find a trivial way to do this, I still didn't give up, just wanted some quick fix that will be inside 0.5.3
Generally I think your suggestion is good, currently we're literally writing html and css to output this tables, using a visualization tool definitely sounds like a better and more robust approach.
I'll need to check whether plotly supports what we need (From short look it looks good, we mostly use tables, and they support it)
Ideally I would want the integration for the user to be as seamless as possible, so again, best if I could automatically determine the theme and set the template accordingly, but if it's not possible, something like config.set_template(template) (one time) sounds better than setting it on every run_local call
I'll definitely check that out,
Thanks!

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

No branches or pull requests

2 participants