timholy / FlameGraphs.jl

Analysis of profiling data using trees
MIT License
51 stars 12 forks source link

Add `darkmode` kwarg to FlameColors and `default_colors_dark` #51

Closed IanButterworth closed 2 years ago

IanButterworth commented 2 years ago

Provides a dark mode for the color generator that biases the colors away from white.

Also provides default_colors_dark as a counter to default_colors.

I guess the general idea in dark modes is to prefer darker colors, so that's what this attempts.

How these look in https://github.com/timholy/ProfileView.jl/pull/193

Screen Shot 2022-01-17 at 5 50 32 PM

Without the biasing the colors get too washed out and the white text is harder to read.

Screen Shot 2022-01-17 at 3 57 45 PM
codecov[bot] commented 2 years ago

Codecov Report

Merging #51 (9a89578) into master (b1c547a) will increase coverage by 0.02%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #51      +/-   ##
==========================================
+ Coverage   92.87%   92.89%   +0.02%     
==========================================
  Files           5        5              
  Lines         351      352       +1     
==========================================
+ Hits          326      327       +1     
  Misses         25       25              
Impacted Files Coverage Δ
src/render.jl 97.33% <100.00%> (+0.03%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b1c547a...9a89578. Read the comment docs.

pfitzseb commented 2 years ago

Any chance this can hook into the whole GTK themes story? Would be really nice for Linux users at least, because all colors are derived from their globally set theme.