-module(etch@style). -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch, inline]). -define(FILEPATH, "src/etch/style.gleam"). -export([default_style/0, with/2, on/2, with_on/3, with_style/2, attributes/2, bold/1, dim/1, italic/1, underline/1, blinking/1, inverse/1, reset_style/1, set_style/1, reset_color/1, reset_foreground/1, reset_background/1, reset_attributes/1, black/1, red/1, bright_red/1, green/1, bright_green/1, yellow/1, bright_yellow/1, blue/1, bright_blue/1, magenta/1, bright_magenta/1, cyan/1, bright_cyan/1, white/1, bright_white/1, bright_grey/1, grey/1, on_black/1, on_red/1, on_bright_red/1, on_green/1, on_bright_green/1, on_yellow/1, on_bright_yellow/1, on_blue/1, on_bright_blue/1, on_magenta/1, on_bright_magenta/1, on_cyan/1, on_bright_cyan/1, on_white/1, on_bright_white/1, on_bright_grey/1, on_grey/1, ansi/2, on_ansi/2, rbg/4, on_rbg/4]). -export_type([color/0, attribute/0, style/0]). -if(?OTP_RELEASE >= 27). -define(MODULEDOC(Str), -moduledoc(Str)). -define(DOC(Str), -doc(Str)). -else. -define(MODULEDOC(Str), -compile([])). -define(DOC(Str), -compile([])). -endif. ?MODULEDOC(" This module provides utilities for styling terminal text.\n"). -type color() :: default | black | grey | red | bright_red | green | bright_green | yellow | bright_yellow | blue | bright_blue | magenta | bright_magenta | cyan | bright_cyan | white | bright_white | bright_grey | {ansi_value, integer()} | {rgb, integer(), integer(), integer()}. -type attribute() :: bold | dim | underline | italic | blinking | inverse. -type style() :: {style, color(), color(), list(attribute())}. -file("src/etch/style.gleam", 83). ?DOC( " Returns default [`Style`](style.html#Style) with terminal's default\n" " foreground and background [`Colors`](style.html#Color))\n" " and no [`Attributes`](style.html#Attribute).\n" ). -spec default_style() -> style(). default_style() -> {style, default, default, []}. -file("src/etch/style.gleam", 98). -spec get_fg(color()) -> binary(). get_fg(C) -> case C of black -> <<"30"/utf8>>; red -> <<"31"/utf8>>; bright_red -> <<"91"/utf8>>; green -> <<"32"/utf8>>; bright_green -> <<"92"/utf8>>; yellow -> <<"33"/utf8>>; bright_yellow -> <<"93"/utf8>>; blue -> <<"34"/utf8>>; bright_blue -> <<"94"/utf8>>; magenta -> <<"35"/utf8>>; bright_magenta -> <<"95"/utf8>>; cyan -> <<"36"/utf8>>; bright_cyan -> <<"96"/utf8>>; white -> <<"37"/utf8>>; bright_white -> <<"97"/utf8>>; bright_grey -> <<"38;5;7"/utf8>>; grey -> <<"90"/utf8>>; {ansi_value, V} -> <<"38;5;"/utf8, (erlang:integer_to_binary(V))/binary>>; {rgb, R, G, B} -> <<<<<<<<<<"38;2;"/utf8, (erlang:integer_to_binary(R))/binary>>/binary, ";"/utf8>>/binary, (erlang:integer_to_binary(G))/binary>>/binary, ";"/utf8>>/binary, (erlang:integer_to_binary(B))/binary>>; default -> <<"39"/utf8>> end. -file("src/etch/style.gleam", 129). -spec get_bg(color()) -> binary(). get_bg(C) -> case C of black -> <<"40"/utf8>>; red -> <<"41"/utf8>>; bright_red -> <<"101"/utf8>>; green -> <<"42"/utf8>>; bright_green -> <<"102"/utf8>>; yellow -> <<"43"/utf8>>; bright_yellow -> <<"103"/utf8>>; blue -> <<"44"/utf8>>; bright_blue -> <<"104"/utf8>>; magenta -> <<"45"/utf8>>; bright_magenta -> <<"105"/utf8>>; cyan -> <<"46"/utf8>>; bright_cyan -> <<"106"/utf8>>; white -> <<"47"/utf8>>; bright_white -> <<"107"/utf8>>; bright_grey -> <<"48;5;7"/utf8>>; grey -> <<"100"/utf8>>; {ansi_value, V} -> <<"48;5;"/utf8, (erlang:integer_to_binary(V))/binary>>; {rgb, R, G, B} -> <<<<<<<<<<"48;2;"/utf8, (erlang:integer_to_binary(R))/binary>>/binary, ";"/utf8>>/binary, (erlang:integer_to_binary(G))/binary>>/binary, ";"/utf8>>/binary, (erlang:integer_to_binary(B))/binary>>; default -> <<"49"/utf8>> end. -file("src/etch/style.gleam", 163). ?DOC( " Sets the foreground color of a string. It does not reset the color after applying it.\n" " Also see [`on`](style.html#on) to set the background color.\n" " Using [`with_on`](style.html#with_on) is prefered to set both the background and foreground colors.\n" ). -spec with(binary(), color()) -> binary(). with(S, C) -> <<<<<<"\x{001b}["/utf8, (get_fg(C))/binary>>/binary, "m"/utf8>>/binary, S/binary>>. -file("src/etch/style.gleam", 170). ?DOC( " Sets the foreground color of a string. It does not reset the color after applying it.\n" " Also see [`with`](style.html#with) to set the foreground color.\n" " Using [`with_on`](style.html#with_on) is prefered to set both the background and foreground colors.\n" ). -spec on(binary(), color()) -> binary(). on(S, C) -> <<<<<<"\x{001b}["/utf8, (get_bg(C))/binary>>/binary, "m"/utf8>>/binary, S/binary>>. -file("src/etch/style.gleam", 176). ?DOC( " Sets both the foreground and background colors. It is the prefered way to set them both for one string.\n" " Also see [`with`](style.html#with) to set the foreground color and [`on`](style.html#on) to set the background color.\n" ). -spec with_on(binary(), color(), color()) -> binary(). with_on(S, Fg, Bg) -> <<<<<<<<<<"\x{001b}["/utf8, (get_fg(Fg))/binary>>/binary, ";"/utf8>>/binary, (get_bg(Bg))/binary>>/binary, "m"/utf8>>/binary, S/binary>>. -file("src/etch/style.gleam", 185). -spec get_attributes(list(attribute()), binary()) -> binary(). get_attributes(A, Acc) -> case A of [] -> <<""/utf8>>; [Attr] -> case Attr of bold -> <<<<"\x{001b}["/utf8, Acc/binary>>/binary, "1"/utf8>>; dim -> <<<<"\x{001b}["/utf8, Acc/binary>>/binary, "2"/utf8>>; italic -> <<<<"\x{001b}["/utf8, Acc/binary>>/binary, "3"/utf8>>; underline -> <<<<"\x{001b}["/utf8, Acc/binary>>/binary, "4"/utf8>>; blinking -> <<<<"\x{001b}["/utf8, Acc/binary>>/binary, "5"/utf8>>; inverse -> <<<<"\x{001b}["/utf8, Acc/binary>>/binary, "7"/utf8>> end; [Attr@1 | Rest] -> Acc@1 = <<(case Attr@1 of bold -> <>; dim -> <>; italic -> <>; underline -> <>; blinking -> <>; inverse -> <> end)/binary, ";"/utf8>>, get_attributes(Rest, Acc@1) end. -file("src/etch/style.gleam", 88). ?DOC(" Applies style to a string.\n"). -spec with_style(binary(), style()) -> binary(). with_style(S, Style) -> <<<<<<<<<<<<"\x{001b}["/utf8, (get_fg(erlang:element(3, Style)))/binary>>/binary, ";"/utf8>>/binary, (get_bg(erlang:element(2, Style)))/binary>>/binary, ";"/utf8>>/binary, (get_attributes(erlang:element(4, Style), <<""/utf8>>))/binary>>/binary, S/binary>>. -file("src/etch/style.gleam", 181). ?DOC(" Sets [`Attributes`](style.html#Attribute) of a string.\n"). -spec attributes(binary(), list(attribute())) -> binary(). attributes(S, A) -> <<<<(get_attributes(A, <<""/utf8>>))/binary, "m"/utf8>>/binary, S/binary>>. -file("src/etch/style.gleam", 214). ?DOC(" Makes the string bold and resets this attribute afterwards.\n"). -spec bold(binary()) -> binary(). bold(S) -> <<<<<<<<"\x{001b}["/utf8, "1m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "22m"/utf8>>. -file("src/etch/style.gleam", 219). ?DOC(" Makes the string dim and resets this attribute afterwards.\n"). -spec dim(binary()) -> binary(). dim(S) -> <<<<<<<<"\x{001b}["/utf8, "2m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "22m"/utf8>>. -file("src/etch/style.gleam", 224). ?DOC(" Makes the string italic and resets this attribute afterwards.\n"). -spec italic(binary()) -> binary(). italic(S) -> <<<<<<<<"\x{001b}["/utf8, "3m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "23m"/utf8>>. -file("src/etch/style.gleam", 229). ?DOC(" Makes the string underline and resets this attribute afterwards.\n"). -spec underline(binary()) -> binary(). underline(S) -> <<<<<<<<"\x{001b}["/utf8, "4m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "24m"/utf8>>. -file("src/etch/style.gleam", 234). ?DOC(" Makes the string blinking and resets this attribute afterwards.\n"). -spec blinking(binary()) -> binary(). blinking(S) -> <<<<<<<<"\x{001b}["/utf8, "5m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "25m"/utf8>>. -file("src/etch/style.gleam", 240). ?DOC( " Makes the string inverse (swaps background and foreground colors)\n" " and resets this attribute afterwards. See [`Color`](style.html#Color).\n" ). -spec inverse(binary()) -> binary(). inverse(S) -> <<<<<<<<"\x{001b}["/utf8, "7m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "27m"/utf8>>. -file("src/etch/style.gleam", 245). ?DOC(" Resets color of the string. See [`Color`](style.html#Color).\n"). -spec reset_style(binary()) -> binary(). reset_style(S) -> <<<>/binary, "39;49;22;23;24;25;27m"/utf8>>. -file("src/etch/style.gleam", 250). ?DOC(" Resets color of the string. See [`Color`](style.html#Color).\n"). -spec set_style(style()) -> binary(). set_style(S) -> with_style(<<""/utf8>>, S). -file("src/etch/style.gleam", 255). ?DOC(" Resets color of the string. See [`Color`](style.html#Color).\n"). -spec reset_color(binary()) -> binary(). reset_color(S) -> <<<>/binary, "39;49m"/utf8>>. -file("src/etch/style.gleam", 260). ?DOC(" Resets foreground of the string. See [`Color`](style.html#Color).\n"). -spec reset_foreground(binary()) -> binary(). reset_foreground(S) -> <<<>/binary, "39m"/utf8>>. -file("src/etch/style.gleam", 265). ?DOC(" Resets background of the string. See [`Color`](style.html#Color).\n"). -spec reset_background(binary()) -> binary(). reset_background(S) -> <<<>/binary, "49m"/utf8>>. -file("src/etch/style.gleam", 270). ?DOC(" Resets [`Attributes`](style.html#Attribute) of the string.\n"). -spec reset_attributes(binary()) -> binary(). reset_attributes(S) -> <<<>/binary, "22;23;24;25;27m"/utf8>>. -file("src/etch/style.gleam", 276). ?DOC( " Sets the foreground [`Color`](style.html#Color) to black and\n" " resets the color afterwards.\n" ). -spec black(binary()) -> binary(). black(S) -> <<<<<<<<"\x{001b}["/utf8, "30m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "39m"/utf8>>. -file("src/etch/style.gleam", 282). ?DOC( " Sets the foreground [`Color`](style.html#Color) to red and\n" " resets the color afterwards.\n" ). -spec red(binary()) -> binary(). red(S) -> <<<<<<<<"\x{001b}["/utf8, "31m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "39m"/utf8>>. -file("src/etch/style.gleam", 288). ?DOC( " Sets the foreground [`Color`](style.html#Color) to bright red and\n" " resets the color afterwards.\n" ). -spec bright_red(binary()) -> binary(). bright_red(S) -> <<<<<<<<"\x{001b}["/utf8, "91m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "39m"/utf8>>. -file("src/etch/style.gleam", 294). ?DOC( " Sets the foreground [`Color`](style.html#Color) to green and\n" " resets the color afterwards.\n" ). -spec green(binary()) -> binary(). green(S) -> <<<<<<<<"\x{001b}["/utf8, "32m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "39m"/utf8>>. -file("src/etch/style.gleam", 300). ?DOC( " Sets the foreground [`Color`](style.html#Color) to bright green and\n" " resets the color afterwards.\n" ). -spec bright_green(binary()) -> binary(). bright_green(S) -> <<<<<<<<"\x{001b}["/utf8, "92m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "39m"/utf8>>. -file("src/etch/style.gleam", 306). ?DOC( " Sets the foreground [`Color`](style.html#Color) to yellow and\n" " resets the color afterwards.\n" ). -spec yellow(binary()) -> binary(). yellow(S) -> <<<<<<<<"\x{001b}["/utf8, "33m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "39m"/utf8>>. -file("src/etch/style.gleam", 312). ?DOC( " Sets the foreground [`Color`](style.html#Color) to bright yellow and\n" " resets the color afterwards.\n" ). -spec bright_yellow(binary()) -> binary(). bright_yellow(S) -> <<<<<<<<"\x{001b}["/utf8, "93m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "39m"/utf8>>. -file("src/etch/style.gleam", 318). ?DOC( " Sets the foreground [`Color`](style.html#Color) to blue and\n" " resets the color afterwards.\n" ). -spec blue(binary()) -> binary(). blue(S) -> <<<<<<<<"\x{001b}["/utf8, "34m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "39m"/utf8>>. -file("src/etch/style.gleam", 324). ?DOC( " Sets the foreground [`Color`](style.html#Color) to bright blue and\n" " resets the color afterwards.\n" ). -spec bright_blue(binary()) -> binary(). bright_blue(S) -> <<<<<<<<"\x{001b}["/utf8, "94m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "39m"/utf8>>. -file("src/etch/style.gleam", 330). ?DOC( " Sets the foreground [`Color`](style.html#Color) to magenta and\n" " resets the color afterwards.\n" ). -spec magenta(binary()) -> binary(). magenta(S) -> <<<<<<<<"\x{001b}["/utf8, "35m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "39m"/utf8>>. -file("src/etch/style.gleam", 336). ?DOC( " Sets the foreground [`Color`](style.html#Color) to bright magenta and\n" " resets the color afterwards.\n" ). -spec bright_magenta(binary()) -> binary(). bright_magenta(S) -> <<<<<<<<"\x{001b}["/utf8, "95m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "39m"/utf8>>. -file("src/etch/style.gleam", 342). ?DOC( " Sets the foreground [`Color`](style.html#Color) to cyan and\n" " resets the color afterwards.\n" ). -spec cyan(binary()) -> binary(). cyan(S) -> <<<<<<<<"\x{001b}["/utf8, "36m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "39m"/utf8>>. -file("src/etch/style.gleam", 348). ?DOC( " Sets the foreground [`Color`](style.html#Color) to bright cyan and\n" " resets the color afterwards.\n" ). -spec bright_cyan(binary()) -> binary(). bright_cyan(S) -> <<<<<<<<"\x{001b}["/utf8, "96m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "39m"/utf8>>. -file("src/etch/style.gleam", 354). ?DOC( " Sets the foreground [`Color`](style.html#Color) to white and\n" " resets the color afterwards.\n" ). -spec white(binary()) -> binary(). white(S) -> <<<<<<<<"\x{001b}["/utf8, "37m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "39m"/utf8>>. -file("src/etch/style.gleam", 360). ?DOC( " Sets the foreground [`Color`](style.html#Color) to bright white and\n" " resets the color afterwards.\n" ). -spec bright_white(binary()) -> binary(). bright_white(S) -> <<<<<<<<"\x{001b}["/utf8, "97m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "39m"/utf8>>. -file("src/etch/style.gleam", 366). ?DOC( " Sets the foreground [`Color`](style.html#Color) to bright grey and\n" " resets the color afterwards.\n" ). -spec bright_grey(binary()) -> binary(). bright_grey(S) -> <<<<<<<<"\x{001b}["/utf8, "38;5;7m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "39m"/utf8>>. -file("src/etch/style.gleam", 372). ?DOC( " Sets the foreground [`Color`](style.html#Color) to grey and\n" " resets the color afterwards.\n" ). -spec grey(binary()) -> binary(). grey(S) -> <<<<<<<<"\x{001b}["/utf8, "90m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "39m"/utf8>>. -file("src/etch/style.gleam", 378). ?DOC( " Sets the background [`Color`](style.html#Color) to black\n" " and resets it afterwards.\n" ). -spec on_black(binary()) -> binary(). on_black(S) -> <<<<<<<<"\x{001b}["/utf8, "40m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "49m"/utf8>>. -file("src/etch/style.gleam", 384). ?DOC( " Sets the background [`Color`](style.html#Color) to red\n" " and resets it afterwards.\n" ). -spec on_red(binary()) -> binary(). on_red(S) -> <<<<<<<<"\x{001b}["/utf8, "41m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "49m"/utf8>>. -file("src/etch/style.gleam", 390). ?DOC( " Sets the background [`Color`](style.html#Color) to bright red\n" " and resets it afterwards.\n" ). -spec on_bright_red(binary()) -> binary(). on_bright_red(S) -> <<<<<<<<"\x{001b}["/utf8, "101m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "49m"/utf8>>. -file("src/etch/style.gleam", 396). ?DOC( " Sets the background [`Color`](style.html#Color) to green\n" " and resets it afterwards.\n" ). -spec on_green(binary()) -> binary(). on_green(S) -> <<<<<<<<"\x{001b}["/utf8, "42m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "49m"/utf8>>. -file("src/etch/style.gleam", 402). ?DOC( " Sets the background [`Color`](style.html#Color) to bright green\n" " and resets it afterwards.\n" ). -spec on_bright_green(binary()) -> binary(). on_bright_green(S) -> <<<<<<<<"\x{001b}["/utf8, "102m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "49m"/utf8>>. -file("src/etch/style.gleam", 408). ?DOC( " Sets the background [`Color`](style.html#Color) to yellow\n" " and resets it afterwards.\n" ). -spec on_yellow(binary()) -> binary(). on_yellow(S) -> <<<<<<<<"\x{001b}["/utf8, "43m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "49m"/utf8>>. -file("src/etch/style.gleam", 414). ?DOC( " Sets the background [`Color`](style.html#Color) to bright yellow\n" " and resets it afterwards.\n" ). -spec on_bright_yellow(binary()) -> binary(). on_bright_yellow(S) -> <<<<<<<<"\x{001b}["/utf8, "103m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "49m"/utf8>>. -file("src/etch/style.gleam", 420). ?DOC( " Sets the background [`Color`](style.html#Color) to blue\n" " and resets it afterwards.\n" ). -spec on_blue(binary()) -> binary(). on_blue(S) -> <<<<<<<<"\x{001b}["/utf8, "44m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "49m"/utf8>>. -file("src/etch/style.gleam", 426). ?DOC( " Sets the background [`Color`](style.html#Color) to bright blue\n" " and resets it afterwards.\n" ). -spec on_bright_blue(binary()) -> binary(). on_bright_blue(S) -> <<<<<<<<"\x{001b}["/utf8, "104m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "49m"/utf8>>. -file("src/etch/style.gleam", 432). ?DOC( " Sets the background [`Color`](style.html#Color) to magenta\n" " and resets it afterwards.\n" ). -spec on_magenta(binary()) -> binary(). on_magenta(S) -> <<<<<<<<"\x{001b}["/utf8, "45m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "49m"/utf8>>. -file("src/etch/style.gleam", 438). ?DOC( " Sets the background [`Color`](style.html#Color) to bright magenta\n" " and resets it afterwards.\n" ). -spec on_bright_magenta(binary()) -> binary(). on_bright_magenta(S) -> <<<<<<<<"\x{001b}["/utf8, "105m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "49m"/utf8>>. -file("src/etch/style.gleam", 444). ?DOC( " Sets the background [`Color`](style.html#Color) to cyan\n" " and resets it afterwards.\n" ). -spec on_cyan(binary()) -> binary(). on_cyan(S) -> <<<<<<<<"\x{001b}["/utf8, "46m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "49m"/utf8>>. -file("src/etch/style.gleam", 450). ?DOC( " Sets the background [`Color`](style.html#Color) to bright cyan\n" " and resets it afterwards.\n" ). -spec on_bright_cyan(binary()) -> binary(). on_bright_cyan(S) -> <<<<<<<<"\x{001b}["/utf8, "106m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "49m"/utf8>>. -file("src/etch/style.gleam", 456). ?DOC( " Sets the background [`Color`](style.html#Color) to white\n" " and resets it afterwards.\n" ). -spec on_white(binary()) -> binary(). on_white(S) -> <<<<<<<<"\x{001b}["/utf8, "47m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "49m"/utf8>>. -file("src/etch/style.gleam", 462). ?DOC( " Sets the background [`Color`](style.html#Color) to bright white\n" " and resets it afterwards.\n" ). -spec on_bright_white(binary()) -> binary(). on_bright_white(S) -> <<<<<<<<"\x{001b}["/utf8, "107m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "49m"/utf8>>. -file("src/etch/style.gleam", 468). ?DOC( " Sets the background [`Color`](style.html#Color) to bright grey\n" " and resets it afterwards.\n" ). -spec on_bright_grey(binary()) -> binary(). on_bright_grey(S) -> <<<<<<<<"\x{001b}["/utf8, "48;5;7m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "49m"/utf8>>. -file("src/etch/style.gleam", 474). ?DOC( " Sets the background [`Color`](style.html#Color) to grey\n" " and resets it afterwards.\n" ). -spec on_grey(binary()) -> binary(). on_grey(S) -> <<<<<<<<"\x{001b}["/utf8, "100m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "49m"/utf8>>. -file("src/etch/style.gleam", 480). ?DOC( " Sets the foreground [`Color`](style.html#Color) to the given ANSI value\n" " and resets it afterwards.\n" ). -spec ansi(binary(), integer()) -> binary(). ansi(S, Value) -> <<<<<<<<<<"\x{001b}["/utf8, (get_fg({ansi_value, Value}))/binary>>/binary, "m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "39m"/utf8>>. -file("src/etch/style.gleam", 486). ?DOC( " Sets the background [`Color`](style.html#Color) to the given ANSI value\n" " and resets it afterwards.\n" ). -spec on_ansi(binary(), integer()) -> binary(). on_ansi(S, Value) -> <<<<<<<<<<"\x{001b}["/utf8, (get_bg({ansi_value, Value}))/binary>>/binary, "m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "49m"/utf8>>. -file("src/etch/style.gleam", 492). ?DOC( " Sets the foreground [`Color`](style.html#Color) to the given RBG color\n" " and resets it afterwards.\n" ). -spec rbg(binary(), integer(), integer(), integer()) -> binary(). rbg(S, R, G, B) -> <<<<<<<<<<"\x{001b}["/utf8, (get_fg({rgb, R, G, B}))/binary>>/binary, "m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "39m"/utf8>>. -file("src/etch/style.gleam", 498). ?DOC( " Sets the background [`Color`](style.html#Color) to the given RBG color\n" " and resets it afterwards.\n" ). -spec on_rbg(binary(), integer(), integer(), integer()) -> binary(). on_rbg(S, R, G, B) -> <<<<<<<<<<"\x{001b}["/utf8, (get_bg({rgb, R, G, B}))/binary>>/binary, "m"/utf8>>/binary, S/binary>>/binary, "\x{001b}["/utf8>>/binary, "49m"/utf8>>.