Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Feat: Add Rosé-Pine variants
  • Loading branch information
ntk148v committed Oct 21, 2022
commit c016fb1390ab3fb3c3ef73bf4fece03af03d0967
50 changes: 50 additions & 0 deletions styles/rose-pine-dawn.go
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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,
}))