mirror of
https://github.com/taigrr/simplecolorpalettes.git
synced 2026-04-02 04:59:08 -07:00
stepping towards api solidification
This commit is contained in:
16
html/html.go
16
html/html.go
@@ -1,6 +1,12 @@
|
||||
package html
|
||||
|
||||
var Colors = map[string]int{
|
||||
import (
|
||||
"sort"
|
||||
|
||||
"github.com/taigrr/go-colorpalettes/simplecolor"
|
||||
)
|
||||
|
||||
var colors = simplecolor.NamedPalette{
|
||||
"aliceblue": 0xF0F8FF,
|
||||
"antiquewhite": 0xFAEBD7,
|
||||
"aqua": 0x00FFFF,
|
||||
@@ -142,3 +148,11 @@ var Colors = map[string]int{
|
||||
"yellow": 0xFFFF00,
|
||||
"yellowgreen": 0x9ACD32,
|
||||
}
|
||||
|
||||
func GetPalette() (sp simplecolor.SimplePalette) {
|
||||
for _, x := range colors {
|
||||
sp = append(sp, x)
|
||||
}
|
||||
sort.Sort(sp)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user