Documentation
¶
Index ¶
- func ContrastRatio(hexFg, hexBg string) float64
- func DeltaPhiStar(hexFg, hexBg string, negativePolarity bool) float64
- func DeltaPhiStarContrast(hexFg, hexBg string, isLightMode bool) float64
- func DeriveContainer(primary string, isLight bool) string
- func EnrichVSCodeTheme(themeData []byte, colors []string) ([]byte, error)
- func EnsureContrast(hexColor, hexBg string, minRatio float64, isLightMode bool) string
- func EnsureContrastDPS(hexColor, hexBg string, minLc float64, isLightMode bool) string
- func EnsureContrastDPSLstar(hexColor, hexBg string, minLc float64, isLightMode bool) string
- func GenerateAlacrittyTheme(colors []string) string
- func GenerateFootTheme(colors []string) string
- func GenerateGhosttyTheme(colors []string) string
- func GenerateJSON(colors []string) string
- func GenerateKittyTheme(colors []string) string
- func GeneratePalette(primaryColor string, opts PaletteOptions) []string
- func Luminance(hex string) float64
- func RGBToHex(rgb RGB) string
- type HSV
- type PaletteOptions
- type RGB
- type VSCodeTheme
- type VSCodeTokenColor
- type VSCodeTokenSetting
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContrastRatio ¶
func DeltaPhiStar ¶
func DeltaPhiStarContrast ¶
func DeriveContainer ¶ added in v0.4.0
func EnsureContrast ¶
func EnsureContrastDPS ¶
func EnsureContrastDPSLstar ¶
Nudge L* until contrast is good enough. Keeps hue intact unlike HSV fiddling.
func GenerateAlacrittyTheme ¶
func GenerateFootTheme ¶ added in v0.4.0
func GenerateGhosttyTheme ¶ added in v0.4.0
func GenerateJSON ¶ added in v0.4.0
func GenerateKittyTheme ¶ added in v0.4.0
func GeneratePalette ¶
func GeneratePalette(primaryColor string, opts PaletteOptions) []string
Types ¶
type PaletteOptions ¶
type VSCodeTheme ¶
type VSCodeTheme struct {
Schema string `json:"$schema"`
Name string `json:"name"`
Type string `json:"type"`
Colors map[string]string `json:"colors"`
TokenColors []VSCodeTokenColor `json:"tokenColors"`
SemanticHighlighting bool `json:"semanticHighlighting"`
SemanticTokenColors map[string]VSCodeTokenSetting `json:"semanticTokenColors"`
}
type VSCodeTokenColor ¶
type VSCodeTokenColor struct {
Scope interface{} `json:"scope"`
Settings VSCodeTokenSetting `json:"settings"`
}
type VSCodeTokenSetting ¶
Click to show internal directories.
Click to hide internal directories.