package d2themes

Import Path
	github.com/pancsta/d2/d2themes (on go.dev)

Dependency Relation
	imports 6 packages, and imported by 9 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)
/* sort by: | */
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 github.com/pancsta/d2/d2themes/d2themescatalog.OrigamiNeutral var github.com/pancsta/d2/d2themes/d2themescatalog.TerminalGrayscaleNeutral var github.com/pancsta/d2/d2themes/d2themescatalog.TerminalNeutral
PatternOverlay renders a legacy pattern overlay for a themable element. Deprecated: PatternOverlay is no longer used by D2 and will be removed after one compatibility release. There is no replacement. Render renders the legacy pattern overlay. Deprecated: PatternOverlay is no longer used by D2 and will be removed after one compatibility release. There is no replacement. func NewPatternOverlay(el *ThemableElement, pattern string) *PatternOverlay
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 is retained for source compatibility. Values are parsed and re-serialized through lib/svg; malformed or event attributes panic. Deprecated: use AddAttributes. BackgroundColor string ClassName string ClipPath is retained for source compatibility and must contain a local identifier. Deprecated: use SetClipPathID. Color string Content is retained as a trusted-markup compatibility escape hatch. Deprecated: use SetText or SetInnerSVG. Cx float64 Cy float64 D string Fill string FillPattern string Height float64 Href string Mask is retained for source compatibility and must be a local IRI in the form url(#id). Deprecated: use SetMaskID. 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) AddAttributes(attributes ...svg.Attribute) (*ThemableElement) Copy() *ThemableElement (*ThemableElement) Render() string (*ThemableElement) SetClipPathID(id svg.ID) (*ThemableElement) SetInnerSVG(content svg.Fragment) (*ThemableElement) SetMaskID(id svg.ID) SetMaskUrl is retained for source compatibility. Deprecated: use SetMaskID. (*ThemableElement) SetText(text 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 github.com/pancsta/d2/d2themes/d2themescatalog.Find(id int64) Theme func NewThemableElement(tag string, inlineTheme *Theme) *ThemableElement func ResolveThemeColor(theme Theme, code string) string func github.com/pancsta/d2/d2renderers/d2svg.RenderLegend(buf *bytes.Buffer, diagram *d2target.Diagram, diagramHash string, theme *Theme) error var github.com/pancsta/d2/d2themes/d2themescatalog.Aubergine var github.com/pancsta/d2/d2themes/d2themescatalog.ButteredToast var github.com/pancsta/d2/d2themes/d2themescatalog.C4 var github.com/pancsta/d2/d2themes/d2themescatalog.ColorblindClear var github.com/pancsta/d2/d2themes/d2themescatalog.CoolClassics var github.com/pancsta/d2/d2themes/d2themescatalog.DarkFlagshipTerrastruct var github.com/pancsta/d2/d2themes/d2themescatalog.DarkMauve var github.com/pancsta/d2/d2themes/d2themescatalog.EarthTones var github.com/pancsta/d2/d2themes/d2themescatalog.EvergladeGreen var github.com/pancsta/d2/d2themes/d2themescatalog.FlagshipTerrastruct var github.com/pancsta/d2/d2themes/d2themescatalog.GrapeSoda var github.com/pancsta/d2/d2themes/d2themescatalog.MixedBerryBlue var github.com/pancsta/d2/d2themes/d2themescatalog.NeutralDefault var github.com/pancsta/d2/d2themes/d2themescatalog.NeutralGrey var github.com/pancsta/d2/d2themes/d2themescatalog.OrangeCreamsicle var github.com/pancsta/d2/d2themes/d2themescatalog.Origami var github.com/pancsta/d2/d2themes/d2themescatalog.ShirleyTemple var github.com/pancsta/d2/d2themes/d2themescatalog.Terminal var github.com/pancsta/d2/d2themes/d2themescatalog.TerminalGrayscale var github.com/pancsta/d2/d2themes/d2themescatalog.VanillaNitroCola
Package-Level Functions (total 5)
NewPatternOverlay returns a legacy pattern overlay. Deprecated: PatternOverlay is no longer used by D2 and will be removed after one compatibility release. There is no replacement.
func ShapeTheme(shape d2target.Shape) (fill, stroke string)
Package-Level Variables (total 4)