BgColor returns the solid fill color when one is set and parses; otherwise (nil, false) — meaning transparent (terminal shows through).
()
| 261 | // BgColor returns the solid fill color when one is set and parses; |
| 262 | // otherwise (nil, false) — meaning transparent (terminal shows through). |
| 263 | func (w *Workspace) BgColor() (*RGB, bool) { |
| 264 | if w.Background.Color == "" { |
| 265 | return nil, false |
| 266 | } |
| 267 | col, ok := ParseHexColor(w.Background.Color) |
| 268 | if !ok { |
| 269 | return nil, false |
| 270 | } |
| 271 | return &col, true |
| 272 | } |
| 273 | |
| 274 | // ActiveBoard returns the currently-focused board, never nil while the |
| 275 | // workspace has at least one board. |