diff --git a/termdashdemo/termdashdemo.go b/termdashdemo/termdashdemo.go index 36c5ad0..78a184c 100644 --- a/termdashdemo/termdashdemo.go +++ b/termdashdemo/termdashdemo.go @@ -569,7 +569,7 @@ func textState(text string, capacity, step int) []rune { // SegmentDisplay. func newTextInput(updateText chan<- string) (*textinput.TextInput, error) { input, err := textinput.New( - textinput.Label("Change text to: ", cell.FgColor(cell.ColorBlue)), + textinput.Label("Change text to: ", cell.FgColor(cell.ColorNumber(33))), textinput.MaxWidthCells(20), textinput.PlaceHolder("enter any text"), textinput.OnSubmit(func(text string) error { @@ -593,10 +593,10 @@ func newSegmentDisplay(ctx context.Context, updateText <-chan string) (*segmentd } colors := []cell.Color{ - cell.ColorBlue, + cell.ColorNumber(33), cell.ColorRed, cell.ColorYellow, - cell.ColorBlue, + cell.ColorNumber(33), cell.ColorGreen, cell.ColorRed, cell.ColorGreen, @@ -854,7 +854,7 @@ func newSines(ctx context.Context) (left, right *button.Button, lc *linechart.Li go periodic(ctx, redrawInterval/3, func() error { step1 = (step1 + 1) % len(inputs) if err := lc.Series("first", rotateFloats(inputs, step1), - linechart.SeriesCellOpts(cell.FgColor(cell.ColorBlue)), + linechart.SeriesCellOpts(cell.FgColor(cell.ColorNumber(33))), ); err != nil { return err } diff --git a/widgets/barchart/barchartdemo/barchartdemo.go b/widgets/barchart/barchartdemo/barchartdemo.go index 72fa681..b1ca09b 100644 --- a/widgets/barchart/barchartdemo/barchartdemo.go +++ b/widgets/barchart/barchartdemo/barchartdemo.go @@ -75,10 +75,10 @@ func main() { barchart.ValueColors([]cell.Color{ cell.ColorRed, cell.ColorYellow, - cell.ColorBlue, + cell.ColorNumber(33), cell.ColorGreen, cell.ColorRed, - cell.ColorBlue, + cell.ColorNumber(33), }), barchart.ShowValues(), barchart.BarWidth(8), diff --git a/widgets/donut/donutdemo/donutdemo.go b/widgets/donut/donutdemo/donutdemo.go index 6944643..501551d 100644 --- a/widgets/donut/donutdemo/donutdemo.go +++ b/widgets/donut/donutdemo/donutdemo.go @@ -95,7 +95,7 @@ func main() { } go playDonut(ctx, green, 0, 1, 250*time.Millisecond, playTypePercent) - blue, err := donut.New(donut.CellOpts(cell.FgColor(cell.ColorBlue))) + blue, err := donut.New(donut.CellOpts(cell.FgColor(cell.ColorNumber(33)))) if err != nil { panic(err) } diff --git a/widgets/gauge/gaugedemo/gaugedemo.go b/widgets/gauge/gaugedemo/gaugedemo.go index a7b77e3..96696e9 100644 --- a/widgets/gauge/gaugedemo/gaugedemo.go +++ b/widgets/gauge/gaugedemo/gaugedemo.go @@ -98,7 +98,7 @@ func main() { absolute, err := gauge.New( gauge.Height(1), - gauge.Color(cell.ColorBlue), + gauge.Color(cell.ColorNumber(33)), gauge.Border(linestyle.Light), gauge.BorderTitle("Absolute progress"), ) diff --git a/widgets/linechart/linechartdemo/linechartdemo.go b/widgets/linechart/linechartdemo/linechartdemo.go index c234ee6..52298ca 100644 --- a/widgets/linechart/linechartdemo/linechartdemo.go +++ b/widgets/linechart/linechartdemo/linechartdemo.go @@ -53,7 +53,7 @@ func playLineChart(ctx context.Context, lc *linechart.LineChart, delay time.Dura i = (i + 1) % len(inputs) rotated := append(inputs[i:], inputs[:i]...) if err := lc.Series("first", rotated, - linechart.SeriesCellOpts(cell.FgColor(cell.ColorBlue)), + linechart.SeriesCellOpts(cell.FgColor(cell.ColorNumber(33))), linechart.SeriesXLabels(map[int]string{ 0: "zero", }), diff --git a/widgets/segmentdisplay/segmentdisplaydemo/segmentdisplaydemo.go b/widgets/segmentdisplay/segmentdisplaydemo/segmentdisplaydemo.go index fad00ee..5d04042 100644 --- a/widgets/segmentdisplay/segmentdisplaydemo/segmentdisplaydemo.go +++ b/widgets/segmentdisplay/segmentdisplaydemo/segmentdisplaydemo.go @@ -46,7 +46,7 @@ func clock(ctx context.Context, sd *segmentdisplay.SegmentDisplay) { spacer = ":" } chunks := []*segmentdisplay.TextChunk{ - segmentdisplay.NewChunk(parts[0], segmentdisplay.WriteCellOpts(cell.FgColor(cell.ColorBlue))), + segmentdisplay.NewChunk(parts[0], segmentdisplay.WriteCellOpts(cell.FgColor(cell.ColorNumber(33)))), segmentdisplay.NewChunk(spacer), segmentdisplay.NewChunk(parts[1], segmentdisplay.WriteCellOpts(cell.FgColor(cell.ColorRed))), } @@ -74,10 +74,10 @@ func rotate(inputs []rune, step int) []rune { func rollText(ctx context.Context, sd *segmentdisplay.SegmentDisplay) { const text = "Termdash" colors := map[rune]cell.Color{ - 'T': cell.ColorBlue, + 'T': cell.ColorNumber(33), 'e': cell.ColorRed, 'r': cell.ColorYellow, - 'm': cell.ColorBlue, + 'm': cell.ColorNumber(33), 'd': cell.ColorGreen, 'a': cell.ColorRed, 's': cell.ColorGreen, diff --git a/widgets/sparkline/sparklinedemo/sparklinedemo.go b/widgets/sparkline/sparklinedemo/sparklinedemo.go index b4631e2..a6b05b2 100644 --- a/widgets/sparkline/sparklinedemo/sparklinedemo.go +++ b/widgets/sparkline/sparklinedemo/sparklinedemo.go @@ -84,7 +84,7 @@ func main() { ctx, cancel := context.WithCancel(context.Background()) green, err := sparkline.New( - sparkline.Label("Green SparkLine", cell.FgColor(cell.ColorBlue)), + sparkline.Label("Green SparkLine", cell.FgColor(cell.ColorNumber(33))), sparkline.Color(cell.ColorGreen), ) if err != nil { @@ -92,7 +92,7 @@ func main() { } go playSparkLine(ctx, green, 250*time.Millisecond) red, err := sparkline.New( - sparkline.Label("Red SparkLine", cell.FgColor(cell.ColorBlue)), + sparkline.Label("Red SparkLine", cell.FgColor(cell.ColorNumber(33))), sparkline.Color(cell.ColorRed), ) if err != nil { diff --git a/widgets/text/textdemo/textdemo.go b/widgets/text/textdemo/textdemo.go index cf30ea9..6ae50ae 100644 --- a/widgets/text/textdemo/textdemo.go +++ b/widgets/text/textdemo/textdemo.go @@ -106,7 +106,7 @@ func main() { if err := wrapped.Write("Supports", text.WriteCellOpts(cell.FgColor(cell.ColorRed))); err != nil { panic(err) } - if err := wrapped.Write(" colors", text.WriteCellOpts(cell.FgColor(cell.ColorBlue))); err != nil { + if err := wrapped.Write(" colors", text.WriteCellOpts(cell.FgColor(cell.ColorNumber(33)))); err != nil { panic(err) } if err := wrapped.Write(" and"); err != nil { diff --git a/widgets/textinput/textinputdemo/textinputdemo.go b/widgets/textinput/textinputdemo/textinputdemo.go index ce0ce43..d4d468c 100644 --- a/widgets/textinput/textinputdemo/textinputdemo.go +++ b/widgets/textinput/textinputdemo/textinputdemo.go @@ -60,10 +60,10 @@ func textState(text string, capacity, step int) []rune { // Exists when the context expires. func rollText(ctx context.Context, sd *segmentdisplay.SegmentDisplay, updateText <-chan string) { colors := []cell.Color{ - cell.ColorBlue, + cell.ColorNumber(33), cell.ColorRed, cell.ColorYellow, - cell.ColorBlue, + cell.ColorNumber(33), cell.ColorGreen, cell.ColorRed, cell.ColorGreen, @@ -127,7 +127,7 @@ func main() { go rollText(ctx, rollingSD, updateText) input, err := textinput.New( - textinput.Label("New text:", cell.FgColor(cell.ColorBlue)), + textinput.Label("New text:", cell.FgColor(cell.ColorNumber(33))), textinput.MaxWidthCells(20), textinput.Border(linestyle.Light), textinput.PlaceHolder("Enter any text"),