diff --git a/autoload/vimwiki/html.vim b/autoload/vimwiki/html.vim
index ba2cc4c..0ad9ea4 100644
--- a/autoload/vimwiki/html.vim
+++ b/autoload/vimwiki/html.vim
@@ -344,7 +344,27 @@ endfunction
function! s:tag_code(value)
- return ''.s:safe_html_preformatted(s:mid(a:value, 1)).''
+ let l:retstr = ' 0.5)
+ \ ? "black" : "white"
+
+ let l:retstr .=
+ \ " style='background-color:" . l:str .
+ \ ";color:" . l:fg_color . ";'"
+ endif
+
+ let l:retstr .= '>'.s:safe_html_preformatted(l:str).''
+ return l:retstr
endfunction
diff --git a/doc/vimwiki.txt b/doc/vimwiki.txt
index 066e15d..fbce6e5 100644
--- a/doc/vimwiki.txt
+++ b/doc/vimwiki.txt
@@ -886,6 +886,12 @@ For Markdown syntax these variations are used: >
Furthermore, there are a number of words which are highlighted extra flashy:
TODO, DONE, STARTED, FIXME, FIXED, XXX.
+When rendered as HTML, code blocks containing only a hash prefixed 6 digit hex
+number will be colored as themselves. For example >
+ `#ffe119`
+Becomes >
+ #ffe119
+
------------------------------------------------------------------------------
5.2. Links *vimwiki-syntax-links*