bobzhang/pygments/styles does not have a README file

    ClassNotFound

    pub suberror ClassNotFound {
    ClassNotFound(String)
    } derive(
    Debug
    )

    Raised when no style matches a lookup (Python's ClassNotFound).

    StyleError

    pub suberror StyleError {
    WrongColorFormat(String)
    UnknownToken(
    TokenType
    )
    } derive(
    Debug
    )

    Errors raised while building or querying a style.

    Style

    pub struct Style {
    name : String
    aliases : Array[String]
    background_color : String?
    highlight_color : String?
    line_number_color : String
    line_number_background_color : String
    line_number_special_color : String
    line_number_special_background_color : String
    web_style_gallery_exclude : Bool
    styles : Map[
    TokenType
    , String]
    // private fields
    }

    A highlighting style: the equivalent of a pygments.style.Style class after StyleMeta processed it.

    Style::iter

    Python's __iter__: every token type the style knows, in definition order, with its style_for_token dictionary.

    Style::length

    fn Style::length(self : Style) -> Int

    Python's __len__: the number of token types the style knows.

    Style::list_styles

    Python's list_styles.

    Style::new

    fn Style::new(styles : Array[(
    TokenType
    , String)], name? : String, aliases? : Array[String], background_color? : String?, highlight_color? : String?, line_number_color? : String, line_number_background_color? : String, line_number_special_color? : String, line_number_special_background_color? : String, web_style_gallery_exclude? : Bool) -> Style raise StyleError

    Builds a style from its styles entries (token type, style string), like defining a Style subclass in Python. Entries for standard token types that are missing are added (empty), as StyleMeta does.

    test {
    let st = @styles.Style::new([
    (@token.keyword, "bold #008000"),
    (@token.keyword_type, "nobold"),
    ])
    let kt = st.style_for_token(@token.keyword_type)
    inspect(kt.color.unwrap_or("-"), content="008000")
    inspect(kt.bold, content="false")
    }

    Style::style_def

    The processed definition of ttype (Python's cls._styles[ttype]).

    Style::style_for_token

    fn Style::style_for_token(self : Style, ttype :
    TokenType
    ) -> TokenStyle raise StyleError

    Python's style_for_token: the style of ttype with ANSI color names resolved to RGB values.

    Style::styles_token

    fn Style::styles_token(self : Style, ttype :
    TokenType
    ) -> Bool

    Python's styles_token: whether the style defines ttype.

    StyleDef

    pub(all) struct StyleDef {
    color : String
    bold : Bool
    italic : Bool
    underline : Bool
    bgcolor : String
    border : String
    roman : Bool
    sans : Bool
    mono : Bool
    } derive(Eq,
    Debug
    )

    The processed definition of one token type (Python's _styles list [color, bold, italic, underline, bgcolor, border, roman, sans, mono]). Colors are normalised: "", a 6-digit hex value without #, an ANSI color name, transparent, or a CSS var(...)/calc(...) expression.

    TokenStyle

    pub(all) struct TokenStyle {
    color : String?
    bold : Bool
    italic : Bool
    underline : Bool
    bgcolor : String?
    border : String?
    roman : Bool
    sans : Bool
    mono : Bool
    ansicolor : String?
    bgansicolor : String?
    } derive(Eq,
    Debug
    )

    Python's style_for_token dictionary. None stands for Python's None; roman, sans and mono are True or None in Python, true or false here.

    abap_style

    fn abap_style() -> Style

    Python's pygments.styles.abap.AbapStyle (style abap).

    algol_nu_style

    fn algol_nu_style() -> Style

    Python's pygments.styles.algol_nu.Algol_NuStyle (style algol_nu).

    algol_style

    fn algol_style() -> Style

    Python's pygments.styles.algol.AlgolStyle (style algol).

    ansimap

    let ansimap : Map[String, String]

    Python's pygments.style._ansimap: the default RGB value of every ANSI color name.

    arduino_style

    fn arduino_style() -> Style

    Python's pygments.styles.arduino.ArduinoStyle (style arduino).

    autumn_style

    fn autumn_style() -> Style

    Python's pygments.styles.autumn.AutumnStyle (style autumn).

    black_white_style

    fn black_white_style() -> Style

    Python's pygments.styles.bw.BlackWhiteStyle (style bw).

    borland_style

    fn borland_style() -> Style

    Python's pygments.styles.borland.BorlandStyle (style borland).

    coffee_style

    fn coffee_style() -> Style

    Python's pygments.styles.coffee.CoffeeStyle (style coffee).

    colorformat

    fn colorformat(text : String) -> String raise StyleError

    Python's StyleMeta.colorformat.

    colorful_style

    fn colorful_style() -> Style

    Python's pygments.styles.colorful.ColorfulStyle (style colorful).

    default_style

    fn default_style() -> Style

    Python's pygments.styles.default.DefaultStyle (style default).

    deprecated_ansicolors

    let deprecated_ansicolors : Map[String, String]

    Python's pygments.style._deprecated_ansicolors: the pre-2.4 #ansixxx names and their replacements.

    dracula_style

    fn dracula_style() -> Style

    Python's pygments.styles.dracula.DraculaStyle (style dracula).

    emacs_style

    fn emacs_style() -> Style

    Python's pygments.styles.emacs.EmacsStyle (style emacs).

    friendly_grayscale_style

    fn friendly_grayscale_style() -> Style

    Python's pygments.styles.friendly_grayscale.FriendlyGrayscaleStyle (style friendly_grayscale).

    friendly_style

    fn friendly_style() -> Style

    Python's pygments.styles.friendly.FriendlyStyle (style friendly).

    fruity_style

    fn fruity_style() -> Style

    Python's pygments.styles.fruity.FruityStyle (style fruity).

    get_all_styles

    fn get_all_styles() -> Array[String]

    Python's get_all_styles: the names of all builtin styles.

    get_style_by_name

    fn get_style_by_name(name : String) -> Style raise ClassNotFound

    Python's get_style_by_name: the builtin style called name.

    test {
    let st = @styles.get_style_by_name("monokai")
    inspect(st.background_color.unwrap_or("-"), content="#272822")
    try @styles.get_style_by_name("nope") catch {
    ClassNotFound(msg) =>
    inspect(
    msg,
    content="Could not find style module 'pygments.styles.nope'.",
    )
    } noraise {
    _ => fail("expected ClassNotFound")
    }
    }

    gh_dark_style

    fn gh_dark_style() -> Style

    Python's pygments.styles.gh_dark.GhDarkStyle (style github-dark).

    gruvbox_dark_style

    fn gruvbox_dark_style() -> Style

    Python's pygments.styles.gruvbox.GruvboxDarkStyle (style gruvbox-dark).

    gruvbox_light_style

    fn gruvbox_light_style() -> Style

    Python's pygments.styles.gruvbox.GruvboxLightStyle (style gruvbox-light).

    igor_style

    fn igor_style() -> Style

    Python's pygments.styles.igor.IgorStyle (style igor).

    ink_pot_style

    fn ink_pot_style() -> Style

    Python's pygments.styles.inkpot.InkPotStyle (style inkpot).

    is_ansicolor

    fn is_ansicolor(name : String) -> Bool

    Python's pygments.style.ansicolors: whether name is an ANSI color name.

    lightbulb_style

    fn lightbulb_style() -> Style

    Python's pygments.styles.lightbulb.LightbulbStyle (style lightbulb).

    lily_pond_style

    fn lily_pond_style() -> Style

    Python's pygments.styles.lilypond.LilyPondStyle (style lilypond).

    lovelace_style

    fn lovelace_style() -> Style

    Python's pygments.styles.lovelace.LovelaceStyle (style lovelace).

    manni_style

    fn manni_style() -> Style

    Python's pygments.styles.manni.ManniStyle (style manni).

    material_style

    fn material_style() -> Style

    Python's pygments.styles.material.MaterialStyle (style material).

    monokai_style

    fn monokai_style() -> Style

    Python's pygments.styles.monokai.MonokaiStyle (style monokai).

    murphy_style

    fn murphy_style() -> Style

    Python's pygments.styles.murphy.MurphyStyle (style murphy).

    native_style

    fn native_style() -> Style

    Python's pygments.styles.native.NativeStyle (style native).

    night_owl_style

    fn night_owl_style() -> Style

    Python's pygments.styles.night_owl.NightOwlStyle (style night-owl).

    nord_darker_style

    fn nord_darker_style() -> Style

    Python's pygments.styles.nord.NordDarkerStyle (style nord-darker).

    nord_style

    fn nord_style() -> Style

    Python's pygments.styles.nord.NordStyle (style nord).

    one_dark_style

    fn one_dark_style() -> Style

    Python's pygments.styles.onedark.OneDarkStyle (style one-dark).

    paraiso_dark_style

    fn paraiso_dark_style() -> Style

    Python's pygments.styles.paraiso_dark.ParaisoDarkStyle (style paraiso-dark).

    paraiso_light_style

    fn paraiso_light_style() -> Style

    Python's pygments.styles.paraiso_light.ParaisoLightStyle (style paraiso-light).

    pastie_style

    fn pastie_style() -> Style

    Python's pygments.styles.pastie.PastieStyle (style pastie).

    perldoc_style

    fn perldoc_style() -> Style

    Python's pygments.styles.perldoc.PerldocStyle (style perldoc).

    rainbow_dash_style

    fn rainbow_dash_style() -> Style

    Python's pygments.styles.rainbow_dash.RainbowDashStyle (style rainbow_dash).

    rrt_style

    fn rrt_style() -> Style

    Python's pygments.styles.rrt.RrtStyle (style rrt).

    sas_style

    fn sas_style() -> Style

    Python's pygments.styles.sas.SasStyle (style sas).

    solarized_dark_style

    fn solarized_dark_style() -> Style

    Python's pygments.styles.solarized.SolarizedDarkStyle (style solarized-dark).

    solarized_light_style

    fn solarized_light_style() -> Style

    Python's pygments.styles.solarized.SolarizedLightStyle (style solarized-light).

    staroffice_style

    fn staroffice_style() -> Style

    Python's pygments.styles.staroffice.StarofficeStyle (style staroffice).

    stata_dark_style

    fn stata_dark_style() -> Style

    Python's pygments.styles.stata_dark.StataDarkStyle (style stata-dark).

    stata_light_style

    fn stata_light_style() -> Style

    Python's pygments.styles.stata_light.StataLightStyle (style stata-light).

    tango_style

    fn tango_style() -> Style

    Python's pygments.styles.tango.TangoStyle (style tango).

    trac_style

    fn trac_style() -> Style

    Python's pygments.styles.trac.TracStyle (style trac).

    vim_style

    fn vim_style() -> Style

    Python's pygments.styles.vim.VimStyle (style vim).

    visual_studio_style

    fn visual_studio_style() -> Style

    Python's pygments.styles.vs.VisualStudioStyle (style vs).

    xcode_style

    fn xcode_style() -> Style

    Python's pygments.styles.xcode.XcodeStyle (style xcode).

    zenburn_style

    fn zenburn_style() -> Style

    Python's pygments.styles.zenburn.ZenburnStyle (style zenburn).

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io