Blipgloss supports multiple color profiles. The terminal's color profile is automatically detected, and colors outside the gamut are coerced to the closest available value.
Color Profiles
- ANSI 16 (4-bit): Use string IDs like
"5", "9", or "12". - ANSI 256 (8-bit): Use string IDs like
"86" or "201". - True Color (24-bit): Use hex codes like
"#0000FF". - 1-bit Ascii: Black and white only.
Adaptive and Complete Colors
You can specify colors that adapt to light or dark terminal backgrounds, or provide fallback values for different color profiles to prevent degradation.
- Adaptive Colors: Pass an object with
Light and Dark keys. - Complete Colors: Pass an object with
True, ANSI256, and ANSI keys. - Complete Adaptive Colors: Combine both for full control across themes.
// Adaptive Colors
Background({
Light: '236',
Dark: '248'
})
// Complete Colors
Background({
True: "#0000FF",
ANSI256: "86",
ANSI: "5"
})
// Complete Adaptive Colors
Background({
Light: {TrueColor: "#d7ffae", ANSI256: "193", ANSI: "11"},
Dark: {TrueColor: "#d75fee", ANSI256: "163", ANSI: "5"}
})