 
   # Color styles
 
-  defp colorize(escape, string, %{colors: colors}) do
-    if colors[:enabled] do
-      [Keyword.get(colors, escape, escape), string, :reset]
+  defp colorize(key, string, %{colors: colors}) do
+    if escape = colors[:enabled] && colors[key] do
+      [escape, string, :reset]
       |> IO.ANSI.format_fragment(true)
       |> IO.iodata_to_binary()
     else

    end
  end

  defp formatter(_, msg, _config), do: msg

  defp pluralize(1, singular, _plural), do: singular
  defp pluralize(_, _singular, plural), do: plural

    colorize(:failure, msg, config)
  end

  # Diff formatting

  defp formatter(:diff_enabled?, _, %{colors: colors}),
    do: colors[:enabled]

  defp formatter(:diff_delete, doc, config),
    do: colorize_doc(:diff_delete, doc, config)

  defp formatter(:diff_delete_whitespace, doc, config),
    do: colorize_doc(:diff_delete_whitespace, doc, config)

  defp formatter(:diff_insert, doc, config),
    do: colorize_doc(:diff_insert, doc, config)

  defp formatter(:diff_insert_whitespace, doc, config),
    do: colorize_doc(:diff_insert_whitespace, doc, config)
