1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
package picker
import (
"github.com/ChausseBenjamin/termpicker/internal/slider"
"github.com/charmbracelet/bubbles/progress"
)
func RGB() *Model {
r := slider.New('R', 255, progress.WithGradient("#660000", "#ff0000"))
g := slider.New('G', 255, progress.WithGradient("#006600", "#00ff00"))
b := slider.New('B', 255, progress.WithGradient("#000066", "#0000ff"))
rgb := New([]slider.Model{r, g, b}, "RGB")
return rgb
}
func CMYK() *Model {
c := slider.New('C', 100, progress.WithGradient("#006666", "#00ffff"))
m := slider.New('M', 100, progress.WithGradient("#660066", "#ff00ff"))
y := slider.New('Y', 100, progress.WithGradient("#666600", "#ffff00"))
k := slider.New('K', 100, progress.WithSolidFill("#000000"))
cmyk := New([]slider.Model{c, m, y, k}, "CMYK")
return cmyk
}
func HSL() *Model {
h := slider.New('H', 360, progress.WithDefaultGradient())
s := slider.New('S', 100, progress.WithGradient("#95766f", "#f9370b"))
l := slider.New('L', 100, progress.WithGradient("#222222", "#ffffff"))
hsl := New([]slider.Model{h, s, l}, "HSL")
return hsl
}
|