Usage
#import "@preview/gruvy:1.0.0": gruvbox
#show: gruvbox
Configuration
The main gruvbox
function has 4 parameters:
theme
(string): Can belight
ordark
contrast
(string): Can besoft
,medium
orhard
accent
(string): Can bered
,green
,yellow
,blue
,purple
,aqua
ororange
print
(boolean): Setting this to true will make the background white (#FFFFFF
) and override thetheme
as light mode
By default, the configuration will use the dark
theme, hard
contrast and blue
accent
For example:
#import "@preview/gruvy:1.0.0": gruvbox
#show: gruvbox.with(theme: "light", contrast: "soft", accent: "orange")
Accessing colors
#import "@preview/gruvy:1.0.0": colors, theme-colors
Within the snippet above:
-
colors
is a dictionary with the following keys:bright
,neutral
andfaded
, each with a dictionary value with the following keys:red
green
yellow
blue
purple
aqua
orange
monochrome
with an array value of colors from 0 to 14 ascending in brightness
-
theme-colors
is a higher level dictionary consisting:light
anddark
theme dictionaries, each consisting:strong
dictionary that maps to eitherbright
orfaded
within thecolors
dictionary respective to the selected themefg0
that represents the foreground color of each respective themesoft
,medium
andhard
contrast dictionaries that has:bg0
as the background color of each respective contrast
muted
colors that maps toneutral
within thecolors
dictionary
For example:
#import "@preview/gruvy:1.0.0": colors, theme-colors
#text(fill: colors.bright.red)[Example]
#text(fill: colors.monochrome.at(0))[Example]
#text(fill: theme-colors.light.strong.purple)[Example]
#text(fill: theme-colors.muted.green)[Example]
Credits
Original Gruvbox Vim theme by morhetz https://github.com/morhetz/gruvbox