def sgr

cswap-bend-cli@0.1.0.0 · tui/fmt.bend:195

import cswap-bend-cli@0.1.0.0/tui/fmt.bend as Fmt
import Base

195def sgr(+r: Role) -> String:
196  match r:
197    case RPlain{}:
198      ""
199    case RBold{}:
200      "1"
201    case RAccent{}:
202      "38;5;173"
203    case RAccentB{}:
204      "1;38;5;173"
205    case RMuted{}:
206      "38;5;245"
207    case ROk{}:
208      "38;5;108"
209    case RWarn{}:
210      "38;5;179"
211    case RCrit{}:
212      "38;5;167"
213    case RTrack{}:
214      "38;5;238"

Uses (2)

Used by (1)