(declare (block) (standard-bindings) (extended-bindings))
(begin
  (define std/srfi/159/color#color->ansi
    (lambda (_x448_)
      (let ((_$e450_ _x448_))
        (if (eq? 'bold _$e450_)
            '"1"
            (if (eq? 'dark _$e450_)
                '"2"
                (if (eq? 'underline _$e450_)
                    '"4"
                    (if (eq? 'black _$e450_)
                        '"30"
                        (if (eq? 'red _$e450_)
                            '"31"
                            (if (eq? 'green _$e450_)
                                '"32"
                                (if (eq? 'yellow _$e450_)
                                    '"33"
                                    (if (eq? 'blue _$e450_)
                                        '"34"
                                        (if (eq? 'magenta _$e450_)
                                            '"35"
                                            (if (eq? 'cyan _$e450_)
                                                '"36"
                                                (if (eq? 'white _$e450_)
                                                    '"37"
                                                    '"0"))))))))))))))
  (define std/srfi/159/color#ansi-escape
    (lambda (_color446_)
      (string-append
       (string (integer->char '27))
       '"["
       (std/srfi/159/color#color->ansi _color446_)
       '"m")))
  (define std/srfi/159/color#colored
    (lambda (_new-color425_ . _args426_)
      (lambda (_st428_)
        (let ((_color431_ (std/srfi/159/base#_%ask411_ _st428_ 'color)))
          ((let ()
             (std/srfi/159/base#displayed
              (lambda (_st434_)
                (let ((_tmp437_ (std/srfi/159/base#_%ask411_ _st434_ 'color)))
                  (dynamic-wind
                   (lambda ()
                     (std/srfi/159/base#_%tell1752_
                      _st434_
                      'color
                      _new-color425_))
                   (lambda ()
                     ((std/srfi/159/base#each
                       (std/srfi/159/base#each
                        (std/srfi/159/color#ansi-escape _new-color425_)
                        (std/srfi/159/base#each-in-list _args426_)
                        (if (or (memq _new-color425_ '(bold underline))
                                (memq _color431_ '(bold underline)))
                            (std/srfi/159/color#ansi-escape 'reset)
                            std/srfi/159/base#nothing)
                        (std/srfi/159/color#ansi-escape _color431_)))
                      _st434_))
                   (lambda ()
                     (std/srfi/159/base#_%tell1752_
                      _st434_
                      'color
                      _tmp437_)))))))
           _st428_)))))
  (define std/srfi/159/color#as-red
    (lambda _args423_
      (std/srfi/159/color#colored
       'red
       (std/srfi/159/base#each-in-list _args423_))))
  (define std/srfi/159/color#as-blue
    (lambda _args421_
      (std/srfi/159/color#colored
       'blue
       (std/srfi/159/base#each-in-list _args421_))))
  (define std/srfi/159/color#as-green
    (lambda _args419_
      (std/srfi/159/color#colored
       'green
       (std/srfi/159/base#each-in-list _args419_))))
  (define std/srfi/159/color#as-cyan
    (lambda _args417_
      (std/srfi/159/color#colored
       'cyan
       (std/srfi/159/base#each-in-list _args417_))))
  (define std/srfi/159/color#as-yellow
    (lambda _args415_
      (std/srfi/159/color#colored
       'yellow
       (std/srfi/159/base#each-in-list _args415_))))
  (define std/srfi/159/color#as-magenta
    (lambda _args413_
      (std/srfi/159/color#colored
       'magenta
       (std/srfi/159/base#each-in-list _args413_))))
  (define std/srfi/159/color#as-white
    (lambda _args411_
      (std/srfi/159/color#colored
       'white
       (std/srfi/159/base#each-in-list _args411_))))
  (define std/srfi/159/color#as-black
    (lambda _args409_
      (std/srfi/159/color#colored
       'black
       (std/srfi/159/base#each-in-list _args409_))))
  (define std/srfi/159/color#as-bold
    (lambda _args407_
      (std/srfi/159/color#colored
       'bold
       (std/srfi/159/base#each-in-list _args407_))))
  (define std/srfi/159/color#as-underline
    (lambda _args405_
      (std/srfi/159/color#colored
       'underline
       (std/srfi/159/base#each-in-list _args405_)))))
