package color
Import Path
oss.terrastruct.com/d2/lib/color (on go.dev)
Dependency Relation
imports 11 packages, and imported by 7 packages
Package-Level Type Names (total 3)
ColorStops []ColorStop
Direction string
ID string
Type string
func ParseGradient(cssGradient string) (Gradient, error)
func GradientToSVG(gradient Gradient) string
func LinearGradientToSVG(gradient Gradient) string
func RadialGradientToSVG(gradient Gradient) string
Package-Level Functions (total 13)
func GradientToSVG(gradient Gradient) string func IsGradient(color string) bool func IsThemeColor(colorString string) bool func LinearGradientToSVG(gradient Gradient) string func LuminanceCategory(colorString string) (string, error) func ParseGradient(cssGradient string) (Gradient, error) func RadialGradientToSVG(gradient Gradient) string func UniqueGradientID(cssGradient string) string func ValidColor(color string) bool
Package-Level Variables (total 3)
var ColorHexRegex *regexp.Regexp var GradientRegex *regexp.Regexp var NamedColors []string
Package-Level Constants (total 20)
Alternative colors A
const AA4 = "AA4" const AA5 = "AA5"
Alternative colors B
const AB5 = "AB5"
Base Colors: used for containers
const B2 = "B2" const B3 = "B3" const B4 = "B4" const B5 = "B5" const B6 = "B6"
Special
const N1 = "N1" // foreground color const N2 = "N2" const N3 = "N3" const N4 = "N4" const N5 = "N5" const N6 = "N6" const N7 = "N7" // background color const None = "none"![]() |
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. |