You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BenchmarkTools uses hardcoded colors for generating output and unfortunately color choice is not always suitable for all users for various reasons.
I propose to use the following approach instead of colors hardcoding:
# define somewhere at the beginningconst COLOR =Ref((; foo =:red, bar =:green))
# and later in the code, when color is neededprintstyled("what you need to print", COLOR[].foo)
This simple change does not provide full-fledged color theme switching by itself (this probably should be implemented JuliaLang/julia#41435), but it provides an entry point for all future color theme related stuff. I.e. all user level convenience functions would just modify this variable one way or another. And anyway this proposal allows color customization right here and now (maybe slightly cumbersome) unlike the current situation.
Implementing this feature looks like a good beginner PR, doesn't require large modifications of the code base and it solves color issues.
The text was updated successfully, but these errors were encountered:
BenchmarkTools uses hardcoded colors for generating output and unfortunately color choice is not always suitable for all users for various reasons.
I propose to use the following approach instead of colors hardcoding:
This simple change does not provide full-fledged color theme switching by itself (this probably should be implemented JuliaLang/julia#41435), but it provides an entry point for all future color theme related stuff. I.e. all user level convenience functions would just modify this variable one way or another. And anyway this proposal allows color customization right here and now (maybe slightly cumbersome) unlike the current situation.
Implementing this feature looks like a good beginner PR, doesn't require large modifications of the code base and it solves color issues.
The text was updated successfully, but these errors were encountered: