package color
Import Path
github.com/d2lang/mathjax-go/internal/tex/extensions/color (on go.dev)
Dependency Relation
imports 7 packages, and imported by one package
Involved Source Files
config.go
Package color ports MathJax 3.2.2's TeX color extension.
methods.go
model.go
Package-Level Type Names (total 2)
Error is the color extension's source-compatible TeX error. ID is the
localization key used by MathJax 3.2.2 and Message is its formatted English
fallback.
ID string
Message string
(*Error) Error() string
*Error : error
Model stores user-defined colors for one parser. A Model must not be shared
between parser instances; this preserves MathJax's packageData isolation.
The zero value is ready for use.
DefineColor creates or replaces one parser-local named color.
GetColor resolves def according to model. An empty model has MathJax's
special named-color semantics.
func NewModel() *Model
Package-Level Functions (total 2)
NewModel creates an empty, parser-local color model.
PaddingProperties ports ColorMethods.ts's padding() helper. Attribute order
matches the source PropertyList so a core parser can apply it directly to an
mpadded node.
Package-Level Variables (total 2)
Configuration mirrors ColorConfiguration.ts. Macro order is source order.
NamedColors is the dvipsnames color table exported as COLORS by
MathJax 3.2.2's ColorConstants.ts. Names are intentionally case-sensitive.
The map is treated as read-only by this package. It is exported so the TeX
configuration layer can expose the same constants when it registers the
extension.
![]() |
The pages are generated with Golds v0.8.7. (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. |