Fix for org-rainbow-tags (12-digit color codes)#59
Open
mtekman wants to merge 2 commits into
Open
Conversation
…runcate-hex Added some small fixes relating org-rainbow-tags which uses strings for tagnames instead of symbols, and 12-digit color codes. * htmlize-face-to-fstruct: Sets string faces to symbols * htmlize-color-to-rgb: Update the regex for readability, truncate hex if longer than 9 characters, assuming 8-digit rrggbbaa css colors are fine. * htmlize--truncate-hex: New function that converts an arbitrary long color hex to a normal 6 digit hex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
org-rainbow-tags is a package which autogenerates some nice looking color overlays for org-mode tag names.
However, face names use strings instead of symbols (causing
htmlize-face-to-fstructto detect no color at the face at point), and uses 12-digit color codes which Emacs renders fine but CSS does not (hence the fix tohtmlize-color-to-rgb).This PR adds a general fix for quoted face names, and truncates long color hexes into CSS colors.