README

brickfrog/pippa/profile does not have a README file

#
Background

pub(all) enum Background {
Dark
Light
Unknown
} derive(Eq,
Debug
)

Detected terminal background. Unknown resolves like Dark for adaptive colors.
impl Show for Background

#
ColorPolicy

pub(all) enum ColorPolicy {
Auto
Always
Never
} derive(Eq,
Debug
)

User color policy layered on top of detected terminal capability.
impl Show for ColorPolicy

#
ColorProfile

pub(all) enum ColorProfile {
TrueColor
Ansi256
Ansi16
NoColor
} derive(Eq,
Debug
)

Terminal color capability used when rendering style color escapes.

#
ColorValue

pub(all) enum ColorValue {
Palette(Int)
Rgb(Int, Int, Int)
} derive(Eq,
Debug
)

Resolved color value before profile degradation.

#
RenderContext

pub(all) struct RenderContext {
color_profile : ColorProfile
background : Background
color_policy : ColorPolicy
} derive(Eq,
Debug
)

Immutable render-time color facts consumed by style renderers.

#
RenderContext::default

fn RenderContext::default() -> RenderContext

#
RenderContext::detect

#
RenderContext::with_background

fn RenderContext::with_background(self : RenderContext, background : Background) -> RenderContext

#
RenderContext::with_color_policy

fn RenderContext::with_color_policy(self : RenderContext, color_policy : ColorPolicy) -> RenderContext

#
RenderContext::with_color_profile

fn RenderContext::with_color_profile(self : RenderContext, color_profile : ColorProfile) -> RenderContext

#
ambient_context

fn ambient_context() -> RenderContext

#
ansi256_to_ansi16

fn ansi256_to_ansi16(n : Int) -> Int

#
render_bg

fn render_bg(ctx : RenderContext, value : ColorValue) -> String

#
render_fg

fn render_fg(ctx : RenderContext, value : ColorValue) -> String

#
rgb_to_ansi256

fn rgb_to_ansi256(r : Int, g : Int, b : Int) -> Int

#
set_render_context

fn set_render_context(ctx : RenderContext) -> Unit

#
with_render_context

fn[T] with_render_context(ctx : RenderContext, f : () -> T raise?) -> T raise?

Run f with a scoped ambient render context, restoring on return or raise.

Source Files

Powered by MoonBit

Site sourceReport issuePackagesBuild queueSkillsStatistics

© 2026 mooncakes.io