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

Update GitHub theme, add dark mode #1918

Merged
merged 2 commits into from
Jan 24, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add text background color to GH theme
  • Loading branch information
dunkmann00 committed Jan 24, 2023
commit b8d41d0a928f63c0a4fb30d32d2448a33bbef8fe
8 changes: 6 additions & 2 deletions lib/rouge/themes/github.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class Github < CSSTheme
P_GRAY_1 = {:dark => '#c9d1d9'}
P_GRAY_3 = {:dark => '#8b949e'}
P_GRAY_5 = {:light => '#6e7781'}
P_GRAY_8 = {:dark => '#161b22'}
P_GRAY_9 = {:light => '#24292f'}

extend HasModes
Expand All @@ -55,6 +56,7 @@ def self.make_dark!
palette :variable => P_ORANGE_2[@mode]

palette :fgDefault => P_GRAY_1[@mode]
dunkmann00 marked this conversation as resolved.
Show resolved Hide resolved
palette :bgDefault => P_GRAY_8[@mode]

palette :fgInserted => P_GREEN_0[@mode]
palette :bgInserted => P_GREEN_8[@mode]
Expand All @@ -77,6 +79,7 @@ def self.make_light!
palette :variable => P_ORANGE_6[@mode]

palette :fgDefault => P_GRAY_9[@mode]
dunkmann00 marked this conversation as resolved.
Show resolved Hide resolved
palette :bgDefault => P_GRAY_0[@mode]

palette :fgInserted => P_GREEN_6[@mode]
palette :bgInserted => P_GREEN_0[@mode]
Expand All @@ -90,6 +93,8 @@ def self.make_light!

light!

style Text, :fg => :fgDefault, :bg => :bgDefault

style Keyword, :fg => :keyword

style Generic::Error, :fg => :fgError
Expand Down Expand Up @@ -132,8 +137,7 @@ def self.make_light!
Generic::Traceback, :fg => :comment

style Name::Entity,
Literal::String::Interpol,
Text, :fg => :fgDefault
Literal::String::Interpol, :fg => :fgDefault

style Generic::Emph, :fg => :fgDefault, :italic => true

Expand Down