-
Notifications
You must be signed in to change notification settings - Fork 644
HTML color colorcodes. #616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@Nudin @ranebrown , Since this is new feature which has not yet received the attention of other maintainers, I'd like to get your thoughts on whether to merge it. |
My initial thought is why not use something like colorizer that also works for files outside of vimwiki? |
@ranebrown , I think this PR is not about syntax highlighting inside Vim. It's about the generated HTML from |
Ah, that makes more sense. I haven't had a chance to test it myself but the changes seem pretty minimal. I'll give it a try this weekend but if there aren't any issues I think we should merge it. |
@ranebrown It's pretty much that plugin, but for the HTML output. P.S. Thanks for showing me that plugin, I was looking for one! |
I like the feature and the code looks good. Was first a bit hesitated if that might cause a regression for someone since not all hex-codes might be colors. But I'm not sure how big the chance is that someone uses them after a |
I gave this a spin and it seems to work as advertised. I agree that it needs a better scheme for determining the font color. A few colors that the font is difficult to see are @HugoNikanor can you update this to use something like @Nudin suggested for determining the font color and add a short note in the documentation? Thanks! |
Fixed foreground colors and added documentation, and also updated the preview at http://wiki.hornquist.se/Colors.html. (I also see that GitHub has added the same functionality...) |
This colors all CSS color codes found alone in inline code blocks to the color they mention.
This colors all CSS color codes found alone in inline code blocks to the color they mention.
So
#00cc00
Would show up as green, but_#00cc00
would show up as normal (probably gray).Two commits are included, one simply changes the background color, while the other also calculates the inverse of the color and sets that as the text color.
I have set up a demo at http://wiki.hornquist.se/Colors.html.