Logo
Explore Help
Sign In
lupine/ordoor
1
0
Fork 0
You've already forked ordoor
Code Issues Pull Requests Releases Wiki Activity
Files
eac6017c2cfbddec9a112e9d6365fdf54f03021d
ordoor/internal/palettes/palettes.go

21 lines
269 B
Go
Raw Normal View History

Determine the Soldiers At War palette This commit also takes the first step towards making it configurable; override `internal/palettes.DefaultPaletteName` at build time to choose one palette over another. It would be nice to set this at runtime!
2020-05-19 21:33:49 +01:00
package palettes
import (
"image/color"
"sync"
)
var (
Transparent = color.RGBA{R: 0, G: 0, B: 0, A: 0}
Palettes = map[string]color.Palette{}
initPalettes = sync.Once{}
)
Source the palette name from data
2020-06-01 01:24:44 +01:00
func Get(name string) (color.Palette, bool) {
p, ok := Palettes[name]
return p, ok
Determine the Soldiers At War palette This commit also takes the first step towards making it configurable; override `internal/palettes.DefaultPaletteName` at build time to choose one palette over another. It would be nice to set this at runtime!
2020-05-19 21:33:49 +01:00
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.5 Page: 41ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API