Help us shape the future of Go! Take the 2026 Go Developer Survey

brand

package
v0.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrColors         = errors.New("brand: colors must use #RRGGBB")
	ErrFont           = errors.New("brand: invalid font")
	ErrWidth          = errors.New("brand: invalid page width")
	ErrTextContrast   = errors.New("brand: text needs at least 4.5:1 contrast against the background")
	ErrButtonContrast = errors.New("brand: choose a darker accent so white button labels remain readable")
)

Functions

func CSS

func CSS(identity Identity) string

CSS emits only validated tokens, shared by live themes and sandbox previews.

func Validate

func Validate(identity Identity) error

Types

type Identity

type Identity struct {
	Accent     string `json:"accent"`
	Background string `json:"background"`
	Text       string `json:"text"`
	Font       string `json:"font"`
	Width      string `json:"width"`
}

func Default

func Default() Identity

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL