move palettes to subpackage

This commit is contained in:
2022-09-28 19:28:24 -07:00
parent 95a3de23cd
commit d550e96044
8 changed files with 1 additions and 1 deletions

32
palettes/vim/luna/luna.go Normal file
View File

@@ -0,0 +1,32 @@
package luna
import (
"sort"
"sync"
"github.com/taigrr/go-colorpalettes/simplecolor"
)
var once sync.Once
var colors = simplecolor.SimplePalette{0x002b2b,
0x003f3f,
0x005e5e,
0x2aa198,
0x2e8b57,
0x4e4e4e,
0x450000,
0x789f00,
0x780000,
0x973d45,
0xe20000,
0xff8036,
0xffff9a,
0xffffff,
}
func GetPalette() (sp simplecolor.SimplePalette) {
once.Do(func() {
sort.Sort(colors)
})
return colors
}

View File

@@ -0,0 +1,36 @@
package wombat
import (
"sort"
"sync"
"github.com/taigrr/go-colorpalettes/simplecolor"
)
var (
once sync.Once
colors = simplecolor.SimplePalette{
0x141413,
0x242424,
0x32322f,
0x40403c,
0x767676,
0x7cb0e6,
0x86cd74,
0x94e42c,
0xb5d3f3,
0xcae682,
0xdadada,
0xe55345,
0xe5786d,
0xfade3e,
0xfde76e,
}
)
func GetPalette() (sp simplecolor.SimplePalette) {
once.Do(func() {
sort.Sort(colors)
})
return colors
}