Documentation
¶
Overview ¶
Colors and chrome shared by every icebath surface
Index ¶
- Constants
- func Answered(reply string) (light, ok bool)
- func Black(c color.Color) bool
- func ColorAnswered(reply string) (color.Color, bool)
- func FromColorFGBG(value string) (light, ok bool)
- func Hex(v uint32) color.Color
- func IcebathBorder() lipgloss.Border
- func Lit(c color.Color) (light, ok bool)
- func Mix(a, b color.Color, t float64) color.Color
- func Names() []string
- func ParseColor(spec string) (color.Color, bool)
- func RGB(value string) (color.Color, bool)
- func Ratio(a, b color.Color) float64
- func Ring(n int, stops ...color.Color) []color.Color
- func Shade(c color.Color, amount float64) color.Color
- func SystemLight(ctx context.Context) (light, ok bool)
- type Brand
- type Glyphs
- type ID
- type Set
- type Theme
Constants ¶
const DefaultName = "blackwall"
DefaultName is the theme a session starts in, Light standing in for it on a light terminal
Variables ¶
This section is empty.
Functions ¶
func Answered ¶
Whether the color a terminal answered of its background or its foreground, OSC 11 or OSC 10, is light: the answer whole, as the terminal sent it with its end, BEL or ST, or its body alone. false for an answer that names no color
func Black ¶
Whether the color is black whole, as a terminal with a see-through profile answers whatever shows behind it
func ColorAnswered ¶
The color a terminal answered of its background or its foreground, the answer whole or its body. false for one that names no color
func FromColorFGBG ¶
Whether the background a terminal's COLORFGBG names is light, alpha's reading: its last field the number of a color of the 16, 7 and 15 light, any other dark. false for a value that names none
func IcebathBorder ¶
Single line frame with square corners, the icebath border
func Lit ¶
Whether a color of background is light, alpha's way: its luma at least 0.6; false for none
func ParseColor ¶
A color as an X server and the terminals write it in their answers: rgb: with 1 to 4 hex digits to each part, rgba: likewise with its alpha, rgbi: with each part a number from 0 to 1, and # with 3, 6, 9 or 12 hex digits, the same count for each part. false for anything else, a part of no hex digit, of more than four, or out of its range included
func Ratio ¶
Contrast ratio between two colors as the eye takes it, from 1 for the same lightness to 21 for black on white
func Ring ¶
Produces n colors that run through the stops and return to the first so they tile seamlessly
func SystemLight ¶
Whether the desktop asks programs for light colors: the color scheme the desktop portal of freedesktop.org says, as GNOME, KDE and the others answer it (1 dark, 2 light, 0 no preference), otherwise GNOME's own color-scheme, otherwise whether the name of its GTK theme says dark; false where none of them says
Types ¶
type Brand ¶
type Brand struct {
// Line over the banner of a new session, and line the app writes as it quits. Empty for none
Welcome, Goodbye string
// Banner art written in text, drawn in place of icebath's backdrop: the wide art where a window has room across for it, otherwise the
// stacked art. Empty for none. A color is marked as [#rrggbb], [on #rrggbb] for the ground or a part of the style such as [accent],
// [#rrggbb on surface] for both, and [/] ends it
Logo, Hero string
}
The words a style greets and parts with and its banner art, as alpha's skins have them
type Glyphs ¶
type Glyphs struct {
// Mark of the product beside its name
Brand string
Session string
Trace string
Agent string
Approval string
Metrics string
Findings string
Jobs string
Mission string
Sessions string
Settings string
Config string
Palette string
Terminal string
Card string
Profiles string
Models string
Rules string
Hooks string
MCP string
Tools string
Keys string
Ext string
Flow string
Read string
Write string
Edit string
Glob string
Grep string
Shell string
Output string
Kill string
Fetch string
Spawn string
Record string
Plan string
Server string
Tool string
Steer string
Thinking string
Compact string
Hook string
Note string
Error string
Flag string
Ask string
Child string
Attach string
Cursor string
Marked string
Live string
Hollow string
Check string
Skip string
Todo string
Done string
Active string
Bullet string
Mask string
Fork string
// Arrow of the send button, the voice input mark and the spoken replies mark
Send string
Voice string
Speak string
Sep string
// Ellipsis marks text left out of a long output, always three periods
Ellipsis string
Close string
Prompt string
Notch string
Grip string
Back string
Forward string
Info string
Success string
Warn string
Fail string
Search string
// Bell is the notification button's mark on the bar, and Muted replaces it while pop-up notifications are silenced. Each is one code
// point, because a terminal may draw a combining mark beside its letter.
Bell string
Muted string
None string
Rule string
Dashed string
Bar string
Fill string
Slide string
Thumb string
SwitchOn string
SwitchOff string
Caret string
Up string
Down string
Track string
Heavy string
Tick string
HeavyTick string
Hit string
Full string
Empty string
// Eight levels of a bar graph from lowest to highest
Ramp []rune
// Frames of the working spinner
Spinner []string
// One cell symbols of bare navigation chords such as pgup, text labels stand in for chords missing here
Chords map[string]string
}
Glyphs is every mark the interface draws, swapped as one set so the full surface keeps one look.
func ASCIIGlyphs ¶
func ASCIIGlyphs() Glyphs
ASCIIGlyphs returns the same marks in printable ASCII, for terminals without box drawing or symbol fonts.
func IcebathGlyphs ¶
func IcebathGlyphs() Glyphs
IcebathGlyphs returns the icebath set: frost, signal and hazard marks in single cells.
type ID ¶
What tells one style from another: its name and the serial it was handed in under, so what is drawn with a style is drawn again once the style of that name is another
type Set ¶
type Set struct {
// contains filtered or unexported fields
}
Styles one surface draws with: those of the kit, and those it was handed by each source, such as the styles folder of a profile or its extensions. Each surface keeps its own, so what one is handed never reaches another
func (*Set) Named ¶
Style by name, one of the kit first, then that of the first source that handed one of the name. false for an unknown name
type Theme ¶
type Theme struct {
Name string
// What the style looks like, in a few words
About string
Bg color.Color
Surface color.Color
Text color.Color
TextDim color.Color
Steel color.Color
SteelBright color.Color
Ghost color.Color
Accent color.Color
Ice color.Color
Pulse color.Color
Alive color.Color
Alarm color.Color
Ring []color.Color
Border lipgloss.Border
Glyphs Glyphs
Plain bool
// Sixteen ANSI colors programs in a terminal paint with, a nil entry leaving the host terminal color
Terminal [16]color.Color
// What a style file brings of its own beside its colors and marks, nothing for a style of the kit
Brand Brand
// Serial a source handed the style in under, zero for a style of the kit, so a style handed in again under its name is told apart
Serial uint64
}
Palette and border set that a deck paints with
func Contrast ¶
func Contrast() Theme
Black and white palette with saturated signal colors and a thick border for low vision
func Parse ¶
Theme of a style file: the colors it sets over those of the style of the kit it names as its base, the default style when it names none. Its name is the file's own, otherwise the one given
func Plain ¶
func Plain() Theme
Sixteen color palette with an ASCII border for terminals without true color or box drawing
func (Theme) On ¶
Text color that reads on the background: that of the style, or its backdrop where the background is as light as the text