Documentation ¶
Index ¶
- func Clamp(input float64, min, max float64) float64
- type Palette
- func (p Palette) GetAnimatedPalette() (pal []RGB)
- func (p *Palette) GetFromReader(handle io.Reader) (err error)
- func (p Palette) GetGoPalette() (pal color.Palette)
- func (p Palette) GetLitIndexed(index byte, l float64) (idx byte)
- func (p Palette) GetLitRGB(index byte, l float64, lighting_weight float64, brightness float64, ...) (output RGB)
- func (p Palette) GetMaskColour(index byte) (msk byte)
- func (p Palette) GetPrimaryCompanyColourPalette() (pal []RGB)
- func (p Palette) GetRGB(index byte, resolveSpecialColours bool) (output RGB)
- func (p Palette) GetRegularPalette() (pal []RGB)
- func (p Palette) GetSecondaryCompanyColourPalette() (pal []RGB)
- func (p Palette) GetSmoothness(index byte) (smoothness int)
- func (p Palette) IsRenderable(index byte) bool
- func (p Palette) IsSpecialColour(index byte) bool
- func (p *Palette) SetRanges(ranges []PaletteRange) (err error)
- type PaletteEntry
- type PaletteRange
- type RGB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Palette ¶
type Palette struct { Entries []PaletteEntry `json:"entries"` Ranges []PaletteRange `json:"ranges"` CompanyColourLightingContribution float64 `json:"company_colour_lighting_contribution"` DefaultBrightness float64 `json:"default_brightness"` CompanyColourLightingScale float64 `json:"company_colour_lighting_scale"` }
func (Palette) GetAnimatedPalette ¶
Get the palette of animated colours
func (Palette) GetMaskColour ¶
func (Palette) GetPrimaryCompanyColourPalette ¶
Get the palette of primary company colours
func (Palette) GetRegularPalette ¶
Get the palette of non-special colours
func (Palette) GetSecondaryCompanyColourPalette ¶
Get the palette of secondary company colours
func (Palette) GetSmoothness ¶
func (Palette) IsRenderable ¶
func (Palette) IsSpecialColour ¶
func (*Palette) SetRanges ¶
func (p *Palette) SetRanges(ranges []PaletteRange) (err error)
type PaletteEntry ¶
type PaletteEntry struct {
R, G, B byte
Range *PaletteRange
}
func (*PaletteEntry) GetRGB ¶
func (pe *PaletteEntry) GetRGB() (output RGB)
func (*PaletteEntry) UnmarshalJSON ¶
func (pe *PaletteEntry) UnmarshalJSON(data []byte) error
type PaletteRange ¶
type PaletteRange struct { Start byte `json:"start"` End byte `json:"end"` IsPrimaryCompanyColour bool `json:"is_primary_company_colour"` IsSecondaryCompanyColour bool `json:"is_secondary_company_colour"` IsAnimatedLight bool `json:"is_animated_light"` IsProcessColour bool `json:"is_process_colour"` Smoothness int `json:"smoothness"` IsNonRenderable bool `json:"non_renderable"` MaxGapInRegion int `json:"max_gap_in_region"` ExpectedColourRange byte `json:"expected_colour_range"` }
type RGB ¶
func FromPaletteEntry ¶
func FromPaletteEntry(p PaletteEntry) RGB
func PermissiveClampRGB ¶
func (*RGB) DivideAndClamp ¶
func (RGB) MultiplyBy ¶
Click to show internal directories.
Click to hide internal directories.