1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-11-02 17:27:23 -04:00
OpenDiablo2/d2common/d2interface/palette.go
gravestench 783993470e
Lint error cleanup1 (#779)
* fixed lint error in d2app/app.go

* go fmt entire project

* adding doc.go for d2records

* fixed lint issues in d2core/d2map

* fixed lint error in d2interface/palette.go

* fixed lint error in  d2core/d2hero/hero_state_factory.go

* adding dov.go to d2common/d2geom

* fixing lint errors in d2common/d2loader

* adding doc.go to d2common/d2cache

* adding doc files for d2datautils, d2util, d2path

* adding package doc strings for mapgen, in-geam help screen, and tcp client connection

* removed all cuddling lint errors

* changed stamina equality check to '<=' instead of '<'
2020-10-22 01:12:06 -04:00

23 lines
344 B
Go

package d2interface
const numColors = 256
// Color represents a color
type Color interface {
R() uint8
G() uint8
B() uint8
A() uint8
RGBA() uint32
SetRGBA(uint32)
BGRA() uint32
SetBGRA(uint32)
}
// Palette is a color palette
type Palette interface {
NumColors() int
GetColors() [numColors]Color
GetColor(idx int) (Color, error)
}