Navigation Menu

Skip to content

Commit

Permalink
Feat: Add Rosé-Pine variants (#689)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntk148v committed Oct 21, 2022
1 parent b2a2ba5 commit 9b9b245
Show file tree
Hide file tree
Showing 3 changed files with 150 additions and 0 deletions.
50 changes: 50 additions & 0 deletions styles/rose-pine-dawn.go
@@ -0,0 +1,50 @@
package styles

import (
"github.com/alecthomas/chroma/v2"
)

var (
dawnBase = "#faf4ed"
dawnOverlay = "#f2e9e1"
dawnMuted = "#9893a5"
dawnSubtle = "#797593"
dawnText = "#575279"
dawnLove = "#b4637a"
dawnGold = "#ea9d34"
dawnRose = "#d7827e"
dawnPine = "#286983"
dawnFoam = "#56949f"
dawnIris = "#907aa9"
)

// RosePine (dawn) style.
var RosePineDawn = Register(chroma.MustNewStyle("rose-pine-dawn", chroma.StyleEntries{
chroma.Text: dawnText,
chroma.Error: dawnLove,
chroma.Comment: dawnMuted,
chroma.Keyword: dawnPine,
chroma.KeywordNamespace: dawnIris,
chroma.Operator: dawnSubtle,
chroma.Punctuation: dawnSubtle,
chroma.Name: dawnRose,
chroma.NameAttribute: dawnRose,
chroma.NameClass: dawnFoam,
chroma.NameConstant: dawnGold,
chroma.NameDecorator: dawnSubtle,
chroma.NameException: dawnPine,
chroma.NameFunction: dawnRose,
chroma.NameOther: dawnText,
chroma.NameTag: dawnRose,
chroma.LiteralNumber: dawnGold,
chroma.Literal: dawnGold,
chroma.LiteralDate: dawnGold,
chroma.LiteralString: dawnGold,
chroma.LiteralStringEscape: dawnPine,
chroma.GenericDeleted: dawnLove,
chroma.GenericEmph: "italic",
chroma.GenericInserted: dawnFoam,
chroma.GenericStrong: "bold",
chroma.GenericSubheading: dawnOverlay,
chroma.Background: "bg:" + dawnBase,
}))
50 changes: 50 additions & 0 deletions styles/rose-pine-moon.go
@@ -0,0 +1,50 @@
package styles

import (
"github.com/alecthomas/chroma/v2"
)

var (
moonBase = "#232136"
moonOverlay = "#393552"
moonMuted = "#6e6a86"
moonSubtle = "#908caa"
moonText = "#e0def4"
moonLove = "#eb6f92"
moonGold = "#f6c177"
moonRose = "#ea9a97"
moonPine = "#3e8fb0"
moonFoam = "#9ccfd8"
moonIris = "#c4a7e7"
)

// RosePine (moon) style.
var RosePineMoon = Register(chroma.MustNewStyle("rose-pine-moon", chroma.StyleEntries{
chroma.Text: moonText,
chroma.Error: moonLove,
chroma.Comment: moonMuted,
chroma.Keyword: moonPine,
chroma.KeywordNamespace: moonIris,
chroma.Operator: moonSubtle,
chroma.Punctuation: moonSubtle,
chroma.Name: moonRose,
chroma.NameAttribute: moonRose,
chroma.NameClass: moonFoam,
chroma.NameConstant: moonGold,
chroma.NameDecorator: moonSubtle,
chroma.NameException: moonPine,
chroma.NameFunction: moonRose,
chroma.NameOther: moonText,
chroma.NameTag: moonRose,
chroma.LiteralNumber: moonGold,
chroma.Literal: moonGold,
chroma.LiteralDate: moonGold,
chroma.LiteralString: moonGold,
chroma.LiteralStringEscape: moonPine,
chroma.GenericDeleted: moonLove,
chroma.GenericEmph: "italic",
chroma.GenericInserted: moonFoam,
chroma.GenericStrong: "bold",
chroma.GenericSubheading: moonOverlay,
chroma.Background: "bg:" + moonBase,
}))
50 changes: 50 additions & 0 deletions styles/rose-pine.go
@@ -0,0 +1,50 @@
package styles

import (
"github.com/alecthomas/chroma/v2"
)

var (
base = "#191724"
overlay = "#26233a"
muted = "#6e6a86"
subtle = "#908caa"
text = "#e0def4"
love = "#eb6f92"
gold = "#f6c177"
rose = "#ebbcba"
pine = "#31748f"
foam = "#9ccfd8"
iris = "#c4a7e7"
)

// RosePine (Main) style.
var RosePine = Register(chroma.MustNewStyle("rose-pine", chroma.StyleEntries{
chroma.Text: text,
chroma.Error: love,
chroma.Comment: muted,
chroma.Keyword: pine,
chroma.KeywordNamespace: iris,
chroma.Operator: subtle,
chroma.Punctuation: subtle,
chroma.Name: rose,
chroma.NameAttribute: rose,
chroma.NameClass: foam,
chroma.NameConstant: gold,
chroma.NameDecorator: subtle,
chroma.NameException: pine,
chroma.NameFunction: rose,
chroma.NameOther: text,
chroma.NameTag: rose,
chroma.LiteralNumber: gold,
chroma.Literal: gold,
chroma.LiteralDate: gold,
chroma.LiteralString: gold,
chroma.LiteralStringEscape: pine,
chroma.GenericDeleted: love,
chroma.GenericEmph: "italic",
chroma.GenericInserted: foam,
chroma.GenericStrong: "bold",
chroma.GenericSubheading: overlay,
chroma.Background: "bg:" + base,
}))

0 comments on commit 9b9b245

Please sign in to comment.