2016rshah / githubchart-api

:date: Embed github contributions chart as image
https://ghchart.rshah.org/
839 stars 57 forks source link

Dark mode chart #21

Open devTam opened 3 years ago

devTam commented 3 years ago

Can we have a dark mode chart since github updated their site to dark mode?

eridgraves commented 3 years ago

Hi there, I have looked through the GitHub site to find the colors used with their dark theme (if you're into that). I have never used ruby before, so I may or may not open a PR. Feel free to scoop this change if you'd like.

The hex color codes are as follows:

#161b22 -- color-calendar-graph-day-border (no contributions)
#1e6823 -- L1 bg
#034525 -- L2 bg
#0f6d31 -- L3 bg
#00c647 -- L4 bg (most contributions)
#0d1117 -- site background in dark mode

I believe these should be added here, as a new dark scheme: https://github.com/2016rshah/githubchart-api/blob/2a12825b20e92f534ef5628784b2777a7ff2890c/color.rb#L1-L5 i.e. dark: ['#161b22', "#1e6823", "#034525", "#0f6d31", "#00c647"]

It's not obvious to me where the background color of the SVG gets set, but that should be #0d1117.

Hope this helps!

devTam commented 3 years ago

Hi Eric, Also not experienced with Ruby but will tinker with it and see what I can do. Thanks for your help

On Sun, 10 Jan 2021, 23:42 Eric Graves, notifications@github.com wrote:

Hi there, I have looked through the GitHub site to find the colors used with their dark theme (if you're into that). I have never used ruby before, so I may or may not open a PR. Feel free to scoop this change if you'd like.

The hex color codes are as follows:

161b22 -- color-calendar-graph-day-border (no contributions)

1e6823 -- L1 bg

034525 -- L2 bg

0f6d31 -- L3 bg

00c647 -- L4 bg (most contributions)

0d1117 -- site background in dark mode

I believe these should be added here, as a new dark scheme: https://github.com/2016rshah/githubchart-api/blob/2a12825b20e92f534ef5628784b2777a7ff2890c/color.rb#L1-L5 i.e. dark: ['#161b22', "#1e6823", "#034525", "#0f6d31", "#00c647"]

It's not obvious to me where the background color of the SVG gets set, but that should be #0d1117.

Hope this helps!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/2016rshah/githubchart-api/issues/21#issuecomment-757556829, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANPM4IKPUF2Q6TY6FF5HMDLSZIUMDANCNFSM4UV5VSAA .

aryan29 commented 3 years ago

Anyone working on this?

devTam commented 3 years ago

Oh no I dropped it, got very busy with work

On Wed, 31 Mar 2021, 14:45 Aryan Khandelwal, @.***> wrote:

Anyone working on this?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/2016rshah/githubchart-api/issues/21#issuecomment-811080432, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANPM4IISAK6QYRXNKYIFOGLTGMRQFANCNFSM4UV5VSAA .

2016rshah commented 2 years ago

Would be cool! I'm not actively developing this project but I'll add a feature request label in case anybody wants to take a stab at it in the future!