Versions in this module Expand all Collapse all v1 v1.4.0 May 30, 2024 Changes in this version type PaletteRange + ExpectedColourRange byte + IsProcessColour bool + MaxGapInRegion int type RGB + func PermissiveClampRGB(input RGB) (output RGB) v1.3.2 Jan 21, 2021 v1.3.1 Jan 9, 2021 v1.3.0 Dec 7, 2020 v1.2.0 Nov 15, 2020 v1.1.0 Oct 19, 2020 v1.0.0 Aug 4, 2020 Changes in this version + func Clamp(input float64, min, max float64) float64 + type Palette struct + CompanyColourLightingContribution float64 + CompanyColourLightingScale float64 + DefaultBrightness float64 + Entries []PaletteEntry + Ranges []PaletteRange + func FromJson(handle io.Reader) (p Palette, err error) + func (p *Palette) GetFromReader(handle io.Reader) (err error) + func (p *Palette) SetRanges(ranges []PaletteRange) (err error) + func (p Palette) GetAnimatedPalette() (pal []RGB) + 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, brightness float64, contrast 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 + type PaletteEntry struct + B byte + G byte + R byte + Range *PaletteRange + func (pe *PaletteEntry) GetRGB() (output RGB) + func (pe *PaletteEntry) UnmarshalJSON(data []byte) error + type PaletteRange struct + End byte + IsAnimatedLight bool + IsNonRenderable bool + IsPrimaryCompanyColour bool + IsSecondaryCompanyColour bool + Smoothness int + Start byte + type RGB struct + B float64 + G float64 + R float64 + func ClampRGB(input RGB) (output RGB) + func FromPaletteEntry(p PaletteEntry) RGB + func (rgb *RGB) DivideAndClamp(divisor float64) + func (rgb *RGB) GetRGBA(alpha float64) color.NRGBA64 + func (rgb RGB) Add(input RGB) (result RGB) + func (rgb RGB) MultiplyBy(value float64) (result RGB) + func (rgb RGB) Subtract(input RGB) (result RGB)