I’d love to be able to color the text of a task shown with dataview, based on a tag. For instance, I would have the task :
Buy eggs #groceries#2aa34b
I want the text “Buy eggs” in the color of the tag that represents the hex color.
I don’t expect dataview to “read” the tag color, I would set it up in advance (for instance, in a css snippets). Having the tag with the hex color code just helps to avoid having two tags associated with colors for the same entry.
Things I have tried
I found a snippet to color the actual tag text in this thread.
The main reason I would like this to work is to use it with the task calendar made by 702573N. There is an option to change the box/text color from the color property of a page, but I sometimes have different tasks topic on one page.
Why do you want to explicitly specify color in each task and not based on groceries tag for example? I mean more useful would be to create - [ ] buy eggs #groceries and then this task would take the color based on the #groceries. The essence of this approach is to avoid overloaded use of colors and instead dedicate few chosen tags to have pre-defined colors. You also get consistency because now the tag comes with some color.
To avoid several tags with associated colors. That way, even if a task has #groceries AND #vegetables (just an example here), I can make sure there is only one color. I would still pre-define the color code tag, and the tasks would only have one color tag to avoid an overloaded use of colors.
If you pre-define your color tag then why don’t you give it more descriptive name like #personal? I like the idea of having consistent task coloring, but it could be achieved by tag ordering: first tag gives the color for example.