Class: Rouge::Themes::Github
- Inherits:
-
CSSTheme
- Object
- Rouge::Theme
- CSSTheme
- Rouge::Themes::Github
- Extended by:
- HasModes
- Defined in:
- lib/rouge/themes/github.rb
Constant Summary collapse
- P_RED_0 =
Primer primitives https://github.com/primer/primitives/tree/main/src/tokens
{:light => '#ffebe9', :dark => '#ffdcd7'}
- P_RED_3 =
{:dark => '#ff7b72'}
- P_RED_5 =
{:light => '#cf222e'}
- P_RED_7 =
{:light => '#82071e', :dark => '#8e1519'}
- P_RED_8 =
{:dark => '#67060c'}
- P_ORANGE_2 =
{:dark => '#ffa657'}
- P_ORANGE_6 =
{:light => '#953800'}
- P_GREEN_0 =
{:light => '#dafbe1', :dark => '#aff5b4'}
- P_GREEN_1 =
{:dark => '#7ee787'}
- P_GREEN_6 =
{:light => '#116329'}
- P_GREEN_8 =
{:dark => '#033a16'}
- P_BLUE_1 =
{:dark => '#a5d6ff'}
- P_BLUE_2 =
{:dark => '#79c0ff'}
- P_BLUE_5 =
{:dark => '#1f6feb'}
- P_BLUE_6 =
{:light => '#0550ae'}
- P_BLUE_8 =
{:light => '#0a3069'}
- P_PURPLE_2 =
{:dark => '#d2a8ff'}
- P_PURPLE_5 =
{:light => '#8250df'}
- P_GRAY_0 =
{:light => '#f6f8fa', :dark => '#f0f6fc'}
- 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'}
Constants included from Rouge::Token::Tokens
Rouge::Token::Tokens::Num, Rouge::Token::Tokens::Str
Class Method Summary collapse
Methods included from HasModes
get_mode, mode, mode!, set_mode!
Methods inherited from CSSTheme
#initialize, #render, #render_base, #style_for
Methods inherited from Rouge::Theme
base_style, find, get_own_style, #get_own_style, #get_style, get_style, name, #name, #palette, palette, register, registry, render, style, #styles, styles
Methods included from Rouge::Token::Tokens
Constructor Details
This class inherits a constructor from Rouge::CSSTheme
Class Method Details
.dark! ⇒ Object
43 44 45 46 |
# File 'lib/rouge/themes/github.rb', line 43 def self.dark! mode :light # indicate that there is a light variant mode! :dark end |
.light! ⇒ Object
38 39 40 41 |
# File 'lib/rouge/themes/github.rb', line 38 def self.light! mode :dark # indicate that there is a dark variant mode! :light end |
.make_dark! ⇒ Object
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/rouge/themes/github.rb', line 48 def self.make_dark! palette :comment => P_GRAY_3[@mode] palette :constant => P_BLUE_2[@mode] palette :entity => P_PURPLE_2[@mode] palette :heading => P_BLUE_5[@mode] palette :keyword => P_RED_3[@mode] palette :string => P_BLUE_1[@mode] palette :tag => P_GREEN_1[@mode] palette :variable => P_ORANGE_2[@mode] palette :fgDefault => P_GRAY_1[@mode] palette :bgDefault => P_GRAY_8[@mode] palette :fgInserted => P_GREEN_0[@mode] palette :bgInserted => P_GREEN_8[@mode] palette :fgDeleted => P_RED_0[@mode] palette :bgDeleted => P_RED_8[@mode] palette :fgError => P_GRAY_0[@mode] palette :bgError => P_RED_7[@mode] end |
.make_light! ⇒ Object
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/rouge/themes/github.rb', line 71 def self.make_light! palette :comment => P_GRAY_5[@mode] palette :constant => P_BLUE_6[@mode] palette :entity => P_PURPLE_5[@mode] palette :heading => P_BLUE_6[@mode] palette :keyword => P_RED_5[@mode] palette :string => P_BLUE_8[@mode] palette :tag => P_GREEN_6[@mode] palette :variable => P_ORANGE_6[@mode] palette :fgDefault => P_GRAY_9[@mode] palette :bgDefault => P_GRAY_0[@mode] palette :fgInserted => P_GREEN_6[@mode] palette :bgInserted => P_GREEN_0[@mode] palette :fgDeleted => P_RED_7[@mode] palette :bgDeleted => P_RED_0[@mode] palette :fgError => P_GRAY_0[@mode] palette :bgError => P_RED_7[@mode] end |