Skip to content
Draft
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
10 changes: 6 additions & 4 deletions examples/artichokes/artichokes.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ _carduus_ in Carthage and Cordoba.
1. Carrots
1. Celery
1. Tacos
* Soft
* Hard
* Soft
* Hard
1. Cucumber

## Things to eat today
Expand All @@ -38,7 +38,7 @@ _carduus_ in Carthage and Cordoba.
### Power levels of the aforementioned foods

| Name | Power | Comment |
| --- | --- | --- |
| ---------- | ----- | ---------------- |
| Carrots | 9001 | It’s over 9000?! |
| Ramen | 9002 | Also over 9000?! |
| Currywurst | 10000 | What?! |
Expand All @@ -62,6 +62,8 @@ main = putStrLn
$ hello <$> [ "artichoke", "alcachofa" ]
```

_Alcachofa_, if you were wondering, is artichoke in Spanish.

***

_Alcachofa_, if you were wondering, is artichoke in Spanish.
![Charm](https://stuff.charm.sh/charm-badge.jpg)
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ require (
github.com/charmbracelet/lipgloss/v2 v2.0.0-beta.1.0.20250523195325-2d1af06b557c
github.com/charmbracelet/x/ansi v0.9.3-0.20250516160309-24eee56f89fa
github.com/charmbracelet/x/cellbuf v0.0.14-0.20250516160309-24eee56f89fa
github.com/charmbracelet/x/exp/charmtone v0.0.0-20250627134340-c144409e381c
github.com/charmbracelet/x/exp/golden v0.0.0-20240806155701-69247e0abc2a
github.com/charmbracelet/x/exp/slice v0.0.0-20250327172914-2fdc97757edf
github.com/microcosm-cc/bluemonday v1.0.27
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ github.com/charmbracelet/x/ansi v0.9.3-0.20250516160309-24eee56f89fa h1:JU05TLAB
github.com/charmbracelet/x/ansi v0.9.3-0.20250516160309-24eee56f89fa/go.mod h1:3RQDQ6lDnROptfpWuUVIUG64bD2g2BgntdxH0Ya5TeE=
github.com/charmbracelet/x/cellbuf v0.0.14-0.20250516160309-24eee56f89fa h1:lphz0Z3rsiOtMYiz8axkT24i9yFiueDhJbzyNUADmME=
github.com/charmbracelet/x/cellbuf v0.0.14-0.20250516160309-24eee56f89fa/go.mod h1:xBlh2Yi3DL3zy/2n15kITpg0YZardf/aa/hgUaIM6Rk=
github.com/charmbracelet/x/exp/charmtone v0.0.0-20250627134340-c144409e381c h1:2GELBLPgfSbHU53bsQhR9XIgNuVZ6w+Rz8RWV5Lq+A4=
github.com/charmbracelet/x/exp/charmtone v0.0.0-20250627134340-c144409e381c/go.mod h1:T9jr8CzFpjhFVHjNjKwbAD7KwBNyFnj2pntAO7F2zw0=
github.com/charmbracelet/x/exp/golden v0.0.0-20240806155701-69247e0abc2a h1:G99klV19u0QnhiizODirwVksQB91TJKV/UaTnACcG30=
github.com/charmbracelet/x/exp/golden v0.0.0-20240806155701-69247e0abc2a/go.mod h1:wDlXFlCrmJ8J+swcL/MnGUuYnqgQdW9rhSD61oNMb6U=
github.com/charmbracelet/x/exp/slice v0.0.0-20250327172914-2fdc97757edf h1:rLG0Yb6MQSDKdB52aGX55JT1oi0P0Kuaj7wi1bLUpnI=
Expand Down
77 changes: 39 additions & 38 deletions styles/styles.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package styles

import (
"github.com/charmbracelet/glamour/v2/ansi"
"github.com/charmbracelet/x/exp/charmtone"
)

const (
Expand Down Expand Up @@ -138,7 +139,7 @@ var (
StylePrimitive: ansi.StylePrimitive{
BlockPrefix: "\n",
BlockSuffix: "\n",
Color: stringPtr("252"),
Color: stringPtr(charmtone.Smoke.Hex()),
},
Margin: uintPtr(defaultMargin),
},
Expand All @@ -153,16 +154,16 @@ var (
Heading: ansi.StyleBlock{
StylePrimitive: ansi.StylePrimitive{
BlockSuffix: "\n",
Color: stringPtr("39"),
Color: stringPtr(charmtone.Malibu.Hex()),
Bold: boolPtr(true),
},
},
H1: ansi.StyleBlock{
StylePrimitive: ansi.StylePrimitive{
Prefix: " ",
Suffix: " ",
Color: stringPtr("228"),
BackgroundColor: stringPtr("63"),
Color: stringPtr(charmtone.Zest.Hex()),
BackgroundColor: stringPtr(charmtone.Charple.Hex()),
Bold: boolPtr(true),
},
},
Expand All @@ -189,7 +190,7 @@ var (
H6: ansi.StyleBlock{
StylePrimitive: ansi.StylePrimitive{
Prefix: "###### ",
Color: stringPtr("35"),
Color: stringPtr(charmtone.Guac.Hex()),
Bold: boolPtr(false),
},
},
Expand All @@ -203,7 +204,7 @@ var (
Bold: boolPtr(true),
},
HorizontalRule: ansi.StylePrimitive{
Color: stringPtr("240"),
Color: stringPtr(charmtone.Charcoal.Hex()),
Format: "\n--------\n",
},
Item: ansi.StylePrimitive{
Expand All @@ -218,117 +219,117 @@ var (
Unticked: "[ ] ",
},
Link: ansi.StylePrimitive{
Color: stringPtr("30"),
Color: stringPtr(charmtone.Zinc.Hex()),
Underline: boolPtr(true),
},
LinkText: ansi.StylePrimitive{
Color: stringPtr("35"),
Color: stringPtr(charmtone.Guac.Hex()),
Bold: boolPtr(true),
},
Image: ansi.StylePrimitive{
Color: stringPtr("212"),
Color: stringPtr(charmtone.Cheeky.Hex()),
Underline: boolPtr(true),
},
ImageText: ansi.StylePrimitive{
Color: stringPtr("243"),
Color: stringPtr(charmtone.Oyster.Hex()),
Format: "Image: {{.text}} →",
},
Code: ansi.StyleBlock{
StylePrimitive: ansi.StylePrimitive{
Prefix: " ",
Suffix: " ",
Color: stringPtr("203"),
BackgroundColor: stringPtr("236"),
Color: stringPtr(charmtone.Coral.Hex()),
BackgroundColor: stringPtr(charmtone.Charcoal.Hex()),
},
},
CodeBlock: ansi.StyleCodeBlock{
StyleBlock: ansi.StyleBlock{
StylePrimitive: ansi.StylePrimitive{
Color: stringPtr("244"),
Color: stringPtr(charmtone.Charcoal.Hex()),
},
Margin: uintPtr(defaultMargin),
},
Chroma: &ansi.Chroma{
Text: ansi.StylePrimitive{
Color: stringPtr("#C4C4C4"),
Color: stringPtr(charmtone.Smoke.Hex()),
},
Error: ansi.StylePrimitive{
Color: stringPtr("#F1F1F1"),
BackgroundColor: stringPtr("#F05B5B"),
Color: stringPtr(charmtone.Butter.Hex()),
BackgroundColor: stringPtr(charmtone.Sriracha.Hex()),
},
Comment: ansi.StylePrimitive{
Color: stringPtr("#676767"),
Color: stringPtr(charmtone.Oyster.Hex()),
},
CommentPreproc: ansi.StylePrimitive{
Color: stringPtr("#FF875F"),
Color: stringPtr(charmtone.Bengal.Hex()),
},
Keyword: ansi.StylePrimitive{
Color: stringPtr("#00AAFF"),
Color: stringPtr(charmtone.Malibu.Hex()),
},
KeywordReserved: ansi.StylePrimitive{
Color: stringPtr("#FF5FD2"),
Color: stringPtr(charmtone.Pony.Hex()),
},
KeywordNamespace: ansi.StylePrimitive{
Color: stringPtr("#FF5F87"),
Color: stringPtr(charmtone.Pony.Hex()),
},
KeywordType: ansi.StylePrimitive{
Color: stringPtr("#6E6ED8"),
Color: stringPtr(charmtone.Guppy.Hex()),
},
Operator: ansi.StylePrimitive{
Color: stringPtr("#EF8080"),
Color: stringPtr(charmtone.Salmon.Hex()),
},
Punctuation: ansi.StylePrimitive{
Color: stringPtr("#E8E8A8"),
Color: stringPtr(charmtone.Zest.Hex()),
},
Name: ansi.StylePrimitive{
Color: stringPtr("#C4C4C4"),
Color: stringPtr(charmtone.Smoke.Hex()),
},
NameBuiltin: ansi.StylePrimitive{
Color: stringPtr("#FF8EC7"),
Color: stringPtr(charmtone.Cheeky.Hex()),
},
NameTag: ansi.StylePrimitive{
Color: stringPtr("#B083EA"),
Color: stringPtr(charmtone.Mauve.Hex()),
},
NameAttribute: ansi.StylePrimitive{
Color: stringPtr("#7A7AE6"),
Color: stringPtr(charmtone.Hazy.Hex()),
},
NameClass: ansi.StylePrimitive{
Color: stringPtr("#F1F1F1"),
Color: stringPtr(charmtone.Salt.Hex()),
Underline: boolPtr(true),
Bold: boolPtr(true),
},
NameDecorator: ansi.StylePrimitive{
Color: stringPtr("#FFFF87"),
Color: stringPtr(charmtone.Citron.Hex()),
},
NameFunction: ansi.StylePrimitive{
Color: stringPtr("#00D787"),
Color: stringPtr(charmtone.Guac.Hex()),
},
LiteralNumber: ansi.StylePrimitive{
Color: stringPtr("#6EEFC0"),
Color: stringPtr(charmtone.Julep.Hex()),
},
LiteralString: ansi.StylePrimitive{
Color: stringPtr("#C69669"),
Color: stringPtr(charmtone.Cumin.Hex()),
},
LiteralStringEscape: ansi.StylePrimitive{
Color: stringPtr("#AFFFD7"),
Color: stringPtr(charmtone.Bok.Hex()),
},
GenericDeleted: ansi.StylePrimitive{
Color: stringPtr("#FD5B5B"),
Color: stringPtr(charmtone.Coral.Hex()),
},
GenericEmph: ansi.StylePrimitive{
Italic: boolPtr(true),
},
GenericInserted: ansi.StylePrimitive{
Color: stringPtr("#00D787"),
Color: stringPtr(charmtone.Guac.Hex()),
},
GenericStrong: ansi.StylePrimitive{
Bold: boolPtr(true),
},
GenericSubheading: ansi.StylePrimitive{
Color: stringPtr("#777777"),
Color: stringPtr(charmtone.Squid.Hex()),
},
Background: ansi.StylePrimitive{
BackgroundColor: stringPtr("#373737"),
BackgroundColor: stringPtr(charmtone.Charcoal.Hex()),
},
},
},
Expand Down
Loading