Add X11 color preview to GraphViz files
See original GitHub issueDescription
When the (built-in) GraphViz syntax is active, please inject the phantoms for detected X11 colors.
digraph D {
A [shape=diamond]
B [shape=box]
C [shape=circle]
A -> B [style=dashed, color=grey]
A -> C [color=indianred2]
A -> D [penwidth=5, arrowhead=none]
}
I don’t know if it’s possible to differentiate injection by scope, but if so, it would be even better if embedded HTML/CSS had the CSS colors injected, and the rest of source.dot
had X11 colors.
digraph D {
node [shape=plaintext]
some_node [
label=<
<table border="0" cellborder="1" cellspacing="0">
<tr><td bgcolor="yellow">Foo</td></tr>
<tr><td bgcolor="lightblue"><font color="#0000ff">Bar</font></td></tr>
<tr><td bgcolor="#f0e3ff"><font color="#ff1020">Baz</font></td></tr>
</table>>
];
}
Support Info
- ST ver.: 4125
- Platform: osx
- Arch: x64
- Plugin ver.: 3.8.0
- Install via PC: True
- mdpopups ver.: 4.2.1
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Color Names - Graphviz
aliceblue antiquewhite antiquewhite1 antiquewhite2 antiquewhite3
antiquewhite4 aqua aquamarine aquamarine1 aquamarine2
aquamarine3 aquamarine4 azure azure1 azure2
azure3 azure4 beige bisque bisque1
Read more >Attributes - Graphviz
Thus, to set the color of a node abc , one would use. digraph { abc [color = red] } ... If the...
Read more >FAQ - Graphviz
Read about the color attribute for more information. ... This can be done in the graph file or on the command line.
Read more >color | Graphviz
At present, Graphviz recognizes the default color scheme X11 , and the Brewer color schemes (cf. ColorBrewer). Please note that Brewer color ......
Read more >Output Formats - Graphviz
Format Command‑line parameter Description
BMP bmp Windows Bitmap
CGImage cgimage Apple Core Graphics
DOT canon dot gv xdot xdot1.2 xdot1.4 Graphviz Language
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I cut a release this morning as I wanted to also get some of the fixes out there. Hopefully, this provides enough functionality without giving too many false positives. As long as it’s balanced enough to be useful without being annoying, I think it should be fine,
Yeah. I will probably skip HSV (for now). If GraphViz scoped
bgcolor
,color
, etc. with something special to make them stand out as color attributes, it’d be easier to avoid false positives. I may play around and see if we can maybe use some look behinds to maybe check the attributes. If something like that worked, it’d be easy to do HSV, but right now I worry the non-specific color notation for HSV, coupled with no real scoping to indicate you are in an attribute that allows color, will just cause colors to appear in weird places.