Versions in this module Expand all Collapse all v0 v0.8.2 Aug 24, 2026 v0.8.1 Aug 7, 2026 v0.8.0 Aug 7, 2026 Changes in this version + var CoolNeutral = Neutral + var DarkMauveNeutral = Neutral + var DarkNeutral = Neutral + var WarmNeutral = Neutral + func ResolveThemeColor(theme Theme, code string) string + func ShapeTheme(shape d2target.Shape) (fill, stroke string) + type ColorPalette struct + AA2 string + AA4 string + AA5 string + AB4 string + AB5 string + B1 string + B2 string + B3 string + B4 string + B5 string + B6 string + Neutrals Neutral + type Neutral struct + N1 string + N2 string + N3 string + N4 string + N5 string + N6 string + N7 string + type PatternOverlay struct + func NewPatternOverlay(el *ThemableElement, pattern string) *PatternOverlay + func (o *PatternOverlay) Render() (string, error) + type SpecialRules struct + AllPaper bool + C4 bool + CapsLock bool + ContainerDots bool + Mono bool + NoCornerRadius bool + OuterContainerDoubleBorder bool + type ThemableElement struct + 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 + func NewThemableElement(tag string, inlineTheme *Theme) *ThemableElement + func (el *ThemableElement) Copy() *ThemableElement + func (el *ThemableElement) Render() string + func (el *ThemableElement) SetMaskUrl(url string) + func (el *ThemableElement) SetTranslate(x, y float64) + type ThemableSketchOverlay struct + func NewThemableSketchOverlay(el *ThemableElement, fill string) *ThemableSketchOverlay + func (o *ThemableSketchOverlay) Render() (string, error) + type Theme struct + Colors ColorPalette + ID int64 + Name string + SpecialRules SpecialRules + func (t *Theme) ApplyOverrides(overrides *d2target.ThemeOverrides) + func (t *Theme) IsDark() bool