package d2themes
Import Path
oss.terrastruct.com/d2/d2themes (on go.dev)
Dependency Relation
imports 4 packages, and imported by 6 packages
Involved Source Files
common.go
d2themes defines themes to make d2 diagrams pretty
Color codes: darkest (N1) -> lightest (N7)
element.go
pattern_overlay.go
sketch_overlay.go
Package-Level Type Names (total 7)
Alternative colors A
AA4 string
AA5 string
Alternative colors B
AB5 string
Base Colors: used for containers
B2 string
B3 string
B4 string
B5 string
B6 string
Neutrals Neutral
N1 string
N2 string
N3 string
N4 string
N5 string
N6 string
N7 string
var CoolNeutral
var DarkMauveNeutral
var DarkNeutral
var WarmNeutral
var oss.terrastruct.com/d2/d2themes/d2themescatalog.OrigamiNeutral
var oss.terrastruct.com/d2/d2themes/d2themescatalog.TerminalGrayscaleNeutral
var oss.terrastruct.com/d2/d2themes/d2themescatalog.TerminalNeutral
(*PatternOverlay) Render() (string, error)
func NewPatternOverlay(el *ThemableElement, pattern string) *PatternOverlay
AllPaper bool
CapsLock bool
ContainerDots bool
Mono bool
NoCornerRadius bool
OuterContainerDoubleBorder bool
ThemableElement is a helper class for creating new XML elements.
This should be preferred over formatting and must be used
whenever Fill, Stroke, BackgroundColor or Color contains a color from a theme.
i.e. N[1-7] | B[1-6] | AA[245] | AB[45]
Attributes string
BackgroundColor string
ClassName string
ClipPath string
Color string
Content string
Cx float64
Cy float64
D string
Fill string
FillPattern string
Height float64
Href string
Mask string
Points string
R float64
Rx float64
Ry float64
Stroke string
StrokeDashArray string
Style string
Transform string
Width float64
X float64
X1 float64
X2 float64
Xmlns string
Y float64
Y1 float64
Y2 float64
(*ThemableElement) Copy() *ThemableElement
(*ThemableElement) Render() string
(*ThemableElement) SetMaskUrl(url string)
(*ThemableElement) SetTranslate(x, y float64)
func NewThemableElement(tag string, inlineTheme *Theme) *ThemableElement
func (*ThemableElement).Copy() *ThemableElement
func NewPatternOverlay(el *ThemableElement, pattern string) *PatternOverlay
func NewThemableSketchOverlay(el *ThemableElement, fill string) *ThemableSketchOverlay
TODO we can just call el.Copy() to prevent that
WARNING: Do not reuse the element afterwards as this function changes the Class property
func NewThemableSketchOverlay(el *ThemableElement, fill string) *ThemableSketchOverlay
Colors ColorPalette
ID int64
Name string
SpecialRules SpecialRules
(*Theme) ApplyOverrides(overrides *d2target.ThemeOverrides)
(*Theme) IsDark() bool
func oss.terrastruct.com/d2/d2themes/d2themescatalog.Find(id int64) Theme
func NewThemableElement(tag string, inlineTheme *Theme) *ThemableElement
func ResolveThemeColor(theme Theme, code string) string
var oss.terrastruct.com/d2/d2themes/d2themescatalog.Aubergine
var oss.terrastruct.com/d2/d2themes/d2themescatalog.ButteredToast
var oss.terrastruct.com/d2/d2themes/d2themescatalog.ColorblindClear
var oss.terrastruct.com/d2/d2themes/d2themescatalog.CoolClassics
var oss.terrastruct.com/d2/d2themes/d2themescatalog.DarkFlagshipTerrastruct
var oss.terrastruct.com/d2/d2themes/d2themescatalog.DarkMauve
var oss.terrastruct.com/d2/d2themes/d2themescatalog.EarthTones
var oss.terrastruct.com/d2/d2themes/d2themescatalog.EvergladeGreen
var oss.terrastruct.com/d2/d2themes/d2themescatalog.FlagshipTerrastruct
var oss.terrastruct.com/d2/d2themes/d2themescatalog.GrapeSoda
var oss.terrastruct.com/d2/d2themes/d2themescatalog.MixedBerryBlue
var oss.terrastruct.com/d2/d2themes/d2themescatalog.NeutralDefault
var oss.terrastruct.com/d2/d2themes/d2themescatalog.NeutralGrey
var oss.terrastruct.com/d2/d2themes/d2themescatalog.OrangeCreamsicle
var oss.terrastruct.com/d2/d2themes/d2themescatalog.Origami
var oss.terrastruct.com/d2/d2themes/d2themescatalog.ShirleyTemple
var oss.terrastruct.com/d2/d2themes/d2themescatalog.Terminal
var oss.terrastruct.com/d2/d2themes/d2themescatalog.TerminalGrayscale
var oss.terrastruct.com/d2/d2themes/d2themescatalog.VanillaNitroCola
Package-Level Functions (total 5)
func NewPatternOverlay(el *ThemableElement, pattern string) *PatternOverlay func NewThemableElement(tag string, inlineTheme *Theme) *ThemableElement func NewThemableSketchOverlay(el *ThemableElement, fill string) *ThemableSketchOverlay func ResolveThemeColor(theme Theme, code string) string func ShapeTheme(shape d2target.Shape) (fill, stroke string)
Package-Level Variables (total 4)
var CoolNeutral Neutral var DarkNeutral Neutral var WarmNeutral Neutral![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |