Documentation
¶
Index ¶
- func ColorCSS(value color.NRGBA) string
- func ColorHex(value color.NRGBA) string
- func IsTransparent(value color.NRGBA) bool
- func ParseColor(input any, field ...string) (color.NRGBA, error)
- func Pixels(value float64, basis int) float64
- func WithAlpha(value color.NRGBA, alpha float64) string
- type Align
- type Avatar
- type AvatarInput
- type BackgroundGradient
- type BackgroundGradientDirection
- type BackgroundGradientType
- type ColorStop
- type Divider
- type DividerInput
- type Emoji
- type EmojiInput
- type Fit
- type Gradient
- type GradientInput
- type GradientStop
- type Input
- type Label
- type LabelInput
- type LayoutMode
- type Name
- type Overflow
- type Position
- type QuoteMark
- type QuoteMarkDisplay
- type QuoteMarkInput
- type Rect
- type Shape
- type Text
- type TextInput
- type Theme
- type WatermarkPosition
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsTransparent ¶
func ParseColor ¶
ParseColor accepts CSS Color Level 4 strings, 0xRRGGBB/0xRRGGBBAA integer values, and []number values containing RGB plus an optional alpha channel.
Types ¶
type AvatarInput ¶
type BackgroundGradient ¶
type BackgroundGradient struct {
Type BackgroundGradientType
Direction BackgroundGradientDirection
Stops []ColorStop
}
type BackgroundGradientDirection ¶
type BackgroundGradientDirection string
const ( GradientHorizontal BackgroundGradientDirection = "horizontal" GradientVertical BackgroundGradientDirection = "vertical" GradientDiagonal BackgroundGradientDirection = "diagonal" GradientDiagonalReverse BackgroundGradientDirection = "diagonal-reverse" )
type BackgroundGradientType ¶
type BackgroundGradientType string
const ( LinearGradient BackgroundGradientType = "linear" RadialGradient BackgroundGradientType = "radial" )
type DividerInput ¶
type EmojiInput ¶
type Gradient ¶
type Gradient struct {
Enabled bool
Vertical bool
StartRatio float64
EndRatio float64
Stops []GradientStop
}
type GradientInput ¶
type GradientInput struct {
Enabled *bool
Vertical *bool
StartRatio, EndRatio *float64
Stops *[]GradientStop
}
type GradientStop ¶
type Input ¶
type Input struct {
Base *Theme
Extends Name
Layout *LayoutMode
Width *int
Height *int
Background *color.NRGBA
BackgroundGradient *BackgroundGradient
Avatar *AvatarInput
Gradient *GradientInput
Text *TextInput
QuoteMark *QuoteMarkInput
Divider *DividerInput
Emoji *EmojiInput
DisplayName *LabelInput
Username *LabelInput
Watermark *LabelInput
}
Input overlays a preset. Pointer fields preserve the difference between an omitted value and an intentional zero.
type LabelInput ¶
type LayoutMode ¶
type LayoutMode string
const ( Side LayoutMode = "side" Stacked LayoutMode = "stacked" )
type QuoteMarkDisplay ¶
type QuoteMarkDisplay string
const ( QuoteInline QuoteMarkDisplay = "inline" QuoteBlock QuoteMarkDisplay = "block" QuoteNone QuoteMarkDisplay = "none" )
type QuoteMarkInput ¶
type Theme ¶
type WatermarkPosition ¶
type WatermarkPosition string
const ( WatermarkAuto WatermarkPosition = "auto" WatermarkBottomRight WatermarkPosition = "bottom-right" WatermarkBottomLeft WatermarkPosition = "bottom-left" WatermarkBottomCenter WatermarkPosition = "bottom-center" )
Click to show internal directories.
Click to hide internal directories.