std.pretty.color

-document

multimethod

added in 3.0

Constructs a pretty print document, which may be colored if :print-color is true.

(-document printer/+defaults+ :string “hello there”) => [:span [:pass "36m" “hello there” [:pass "0m"]

(-document printer/+defaults+ :keyword :something) => [:span [:pass "34m" :something [:pass "0m"]

-text

multimethod

added in 3.0

Produces text colored according to the active color scheme. This is mostly useful to clients which want to produce output which matches data printed by Puget, but which is not directly printed by the library. Note that this function still obeys the :print-color option.

(-text printer/+defaults+ :string “hello there”) => “hello there”

(-text printer/+defaults+ :keyword :hello) => “:hello”