From 9b9b245fb6786ab546eaa777da56578481de34ad Mon Sep 17 00:00:00 2001 From: Kien Nguyen-Tuan Date: Sat, 22 Oct 2022 05:36:21 +0700 Subject: [PATCH] =?UTF-8?q?Feat:=20Add=20Ros=C3=A9-Pine=20variants=20(#689?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- styles/rose-pine-dawn.go | 50 ++++++++++++++++++++++++++++++++++++++++ styles/rose-pine-moon.go | 50 ++++++++++++++++++++++++++++++++++++++++ styles/rose-pine.go | 50 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 150 insertions(+) create mode 100644 styles/rose-pine-dawn.go create mode 100644 styles/rose-pine-moon.go create mode 100644 styles/rose-pine.go diff --git a/styles/rose-pine-dawn.go b/styles/rose-pine-dawn.go new file mode 100644 index 000000000..d6c641d50 --- /dev/null +++ b/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, +})) diff --git a/styles/rose-pine-moon.go b/styles/rose-pine-moon.go new file mode 100644 index 000000000..137f18d12 --- /dev/null +++ b/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, +})) diff --git a/styles/rose-pine.go b/styles/rose-pine.go new file mode 100644 index 000000000..c6bae398d --- /dev/null +++ b/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, +}))