Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 6 additions & 0 deletions internal/ui/markdown.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,16 @@ func glamourStyleConfig(thm theme.Theme) ansi.StyleConfig {
//nolint:goconst
func chromaTheme(themeName string) string {
switch themeName {
case "catppuccin-latte":
return "catppuccin-latte"
case "catppuccin-mocha":
return "catppuccin-mocha"
case "dracula":
return "dracula"
case "github-dark":
return "github-dark"
case "github-light":
return "github"
case "gruvbox-dark":
return "gruvbox"
case "gruvbox-dark-hard":
Expand All @@ -165,6 +169,8 @@ func chromaTheme(themeName string) string {
return "onedark"
case "rose-pine-moon":
return "rose-pine-moon"
case "solarized-light":
return "solarized-light"
case "tokyonight":
return "tokyonight-night"
case "xcode-dark":
Expand Down
52 changes: 52 additions & 0 deletions internal/ui/theme/catppuccin_latte.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
package theme

const themeNameCatppuccinLatte = "catppuccin-latte"

func catppuccinLatte() Theme {
return Theme{
Name: themeNameCatppuccinLatte,
Accent1: "#d20f39",
Accent2: "#1a5ad7",
Accent3: "#287a1c",
Accent4: "#8839ef",
Accent5: "#9a5f00",
Accent6: "#0f6f75",
Success: "#287a1c",
Danger: "#d20f39",
Muted: "#686b81",
Foreground: "#4c4f69",
Background: "#eff1f5",
CategoricalColors: []string{
"#d20f39",
"#b91c3d",
"#a9435e",
"#b3268f",
"#a13b86",
"#8839ef",
"#7737c7",
"#7040a8",
"#3f51a2",
"#2456b3",
"#1a5ad7",
"#175fb8",
"#006b83",
"#0f6f75",
"#176b69",
"#18734d",
"#287a1c",
"#34742d",
"#5d7015",
"#776900",
"#856500",
"#9a5f00",
"#a65700",
"#b64f00",
"#b53c25",
"#a94a3a",
"#5c5f77",
"#686b81",
"#4c4f69",
"#62566f",
},
}
}
52 changes: 52 additions & 0 deletions internal/ui/theme/github_light.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
package theme

const themeNameGithubLight = "github-light"

func githubLight() Theme {
return Theme{
Name: themeNameGithubLight,
Accent1: "#cf222e",
Accent2: "#1a7f37",
Accent3: "#0969da",
Accent4: "#8250df",
Accent5: "#9a6700",
Accent6: "#bf3989",
Success: "#1a7f37",
Danger: "#cf222e",
Muted: "#656d76",
Foreground: "#1f2328",
Background: "#ffffff",
CategoricalColors: []string{
"#cf222e",
"#a40e26",
"#bc4c00",
"#953800",
"#9a6700",
"#7d4e00",
"#5f6f00",
"#3f7f20",
"#1a7f37",
"#116329",
"#18765b",
"#1b6f72",
"#0969da",
"#0550ae",
"#3155a5",
"#4f56a6",
"#6639ba",
"#8250df",
"#a034c4",
"#bf3989",
"#9e2f75",
"#a53f5b",
"#8c4a3f",
"#6e5a3a",
"#57606a",
"#656d76",
"#424a53",
"#1f2328",
"#3d596d",
"#594f7a",
},
}
}
52 changes: 52 additions & 0 deletions internal/ui/theme/solarized_light.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
package theme

const themeNameSolarizedLight = "solarized-light"

func solarizedLight() Theme {
return Theme{
Name: themeNameSolarizedLight,
Accent1: "#b13f12",
Accent2: "#1d6fa5",
Accent3: "#2f7d32",
Accent4: "#575ca8",
Accent5: "#876500",
Accent6: "#167b79",
Success: "#2f7d32",
Danger: "#c22630",
Muted: "#71868b",
Foreground: "#586e75",
Background: "#fdf6e3",
CategoricalColors: []string{
"#c22630",
"#a82b3c",
"#b13f12",
"#9c4b0d",
"#876500",
"#776b00",
"#5f720f",
"#427a25",
"#2f7d32",
"#197847",
"#167b68",
"#167b79",
"#126f86",
"#1d6fa5",
"#285f9e",
"#3c5c9f",
"#575ca8",
"#6d529c",
"#81458d",
"#963b76",
"#a13d5d",
"#945044",
"#7b5d3d",
"#65705a",
"#586e75",
"#4f6570",
"#52626f",
"#5f5f78",
"#6b596f",
"#725761",
},
}
}
3 changes: 3 additions & 0 deletions internal/ui/theme/theme.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,18 @@ const (
var ErrInvalidThemeName = errors.New("invalid theme name provided")

var themes = []Theme{
catppuccinLatte(),
catppuccinMocha(),
dracula(),
githubDark(),
githubLight(),
gruvboxDark(),
gruvboxDarkHard(),
gruvboxLight(),
monokaiClassic(),
oneDark(),
rosePineMoon(),
solarizedLight(),
tokyonight(),
xcodeDark(),
}
Expand Down
8 changes: 4 additions & 4 deletions internal/ui/theme/theme_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ func TestNextTheme(t *testing.T) {
{
name: "next theme in middle of list",
currentTheme: "github-dark",
expectedName: "gruvbox-dark",
expectedName: "github-light",
},
{
name: "next theme wraps around",
currentTheme: "xcode-dark",
expectedName: "catppuccin-mocha",
expectedName: "catppuccin-latte",
},
{
name: "next theme trims whitespace",
Expand Down Expand Up @@ -110,11 +110,11 @@ func TestPreviousTheme(t *testing.T) {
{
name: "previous theme in middle of list",
currentTheme: "gruvbox-dark",
expectedName: "github-dark",
expectedName: "github-light",
},
{
name: "previous theme wraps around",
currentTheme: "catppuccin-mocha",
currentTheme: "catppuccin-latte",
expectedName: "xcode-dark",
},
{
Expand Down