agentsclimarketplace

Drawio xml beautifier

Skill smith-source/everything-drawio-mind/sub-skills/drawio-xml-beautifier

** everything-drawio-mind ** is a powerful Draw.io graph processing pipeline that converts AI-generated content into professional, structured, and directly publishable Draw.io graph format.

Install
npx -y skills add smith-source/everything-drawio-mind --skill drawio-xml-beautifier

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

draw.io XML chart beautification and style design guide, including complete style property reference, color schemes, visual effects, and best practices

SKILL.md

33.0 KB, as published. Nobody here has run it

draw.io Appearance Beautification and Style Design Guide

This document focuses on the appearance beautification of draw.io graphics, including style definitions, color schemes, visual effects, and best practices, helping you create professional and beautiful charts.


I. Style Basics

1.1 Style Syntax Rules

Basic Format

Style attributes are semicolon-separated key-value pair strings:

key1=value1;key2=value2;key3=value3;

Rule Description:

  1. Each key-value pair ends with a semicolon ;
  2. Key names and values are connected with an equals sign =
  3. Key names are case-sensitive
  4. Values can be strings, numbers, or booleans (0/1)
  5. The semicolon after the last key-value pair can be omitted, but it's recommended to keep it

Style Inheritance and Overriding

  • Child elements inherit parent element styles
  • Later-defined styles override earlier-defined identical styles
  • Use ; to separate multiple style definitions

II. Complete Style Property Reference

2.1 Shape Styles

Style KeyValuesDescriptionExample
shaperectangle, ellipse, rhombus, cloud, cylinder3, note, parallelogram, hexagon, triangle, callout, card, tape, arrow, etc.Basic shapeshape=ellipse
rounded0, 1Whether to have rounded cornersrounded=1
arcSize0-100Rounded corner arc percentagearcSize=20
aspectfixed, variableFixed or variable aspect ratioaspect=fixed
directionnorth, south, east, westDirection (for arrow shapes)direction=north
rotation0-360Rotation anglerotation=45
flipH0, 1Horizontal flipflipH=1
flipV0, 1Vertical flipflipV=1

Special Shapes

ShapeStyle ValueDescription
Rectangleshape=rectangle or not setDefault shape
Rounded Rectanglerounded=1Used with arcSize
Ellipseshape=ellipseCircle set aspect=fixed
Rhombusshape=rhombusFlowchart decision node
Cylindershape=cylinder3Database icon
Cloudshape=cloudCloud/Network icon
Documentshape=noteDocument/Note
Parallelogramshape=parallelogramInput/Output node
Hexagonshape=hexagonNetwork topology
Triangleshape=triangleDirection indicator
Calloutshape=calloutDialog bubble
Cardshape=cardIndex card style
Tapeshape=tapeTape/Label style
Arrowshape=arrowDirection arrow

2.2 Fill Styles

Style KeyValuesDescriptionExample
fillColor#RRGGBB, noneFill colorfillColor=#dae8fc
fillOpacity0-100Fill opacityfillOpacity=50
gradientColor#RRGGBBGradient end colorgradientColor=#ffffff
gradientDirectionnorth, south, east, westGradient directiongradientDirection=south
glass0, 1Glass effectglass=1
shadow0, 1Shadow effectshadow=1
sketch0, 1Hand-drawn stylesketch=1
comic0, 1Comic stylecomic=1
hachureGapnumberHand-drawn line spacinghachureGap=4
hachureAnglenumberHand-drawn line anglehachureAngle=45
fillWeightnumberHand-drawn fill thicknessfillWeight=2
roughnessnumberHand-drawn roughnessroughness=1
bowingnumberHand-drawn curvaturebowing=1

Fill Effect Examples

<!-- Solid fill -->
style="fillColor=#dae8fc;"

<!-- Gradient fill -->
style="fillColor=#dae8fc;gradientColor=#ffffff;gradientDirection=south;"

<!-- Transparent fill -->
style="fillOpacity=50;fillColor=#dae8fc;"

<!-- No fill -->
style="fillColor=none;"

<!-- Glass effect -->
style="fillColor=#dae8fc;glass=1;"

<!-- Shadow effect -->
style="fillColor=#dae8fc;shadow=1;"

<!-- Hand-drawn style -->
style="fillColor=#dae8fc;sketch=1;roughness=2;hachureGap=5;"

2.3 Stroke Styles

Style KeyValuesDescriptionExample
strokeColor#RRGGBB, noneBorder colorstrokeColor=#6c8ebf
strokeWidthnumberBorder width (pixels)strokeWidth=2
dashed0, 1Whether dasheddashed=1
dashPatternpatternDash patterndashPattern=1 1
rounded0, 1Rounded connectionrounded=1
linecapflat, square, roundLine end stylelinecap=round
linejoinmiter, round, bevelConnection stylelinejoin=round
strokeOpacity0-100Border opacitystrokeOpacity=80
perimeterstyle namePerimeter styleperimeter=ellipsePerimeter

Border Effect Examples

<!-- Solid border -->
style="strokeColor=#6c8ebf;strokeWidth=2;"

<!-- Dashed border -->
style="strokeColor=#6c8ebf;dashed=1;"

<!-- Dotted border -->
style="strokeColor=#6c8ebf;dashed=1;dashPattern=1 3;"

<!-- No border -->
style="strokeColor=none;"

<!-- Double border effect -->
style="strokeColor=#6c8ebf;strokeWidth=3;rounded=1;"

2.4 Text Styles

Style KeyValuesDescriptionExample
fontColor#RRGGBBFont colorfontColor=#333333
fontSizenumberFont size (pixels)fontSize=14
fontFamilyfont nameFont familyfontFamily=Arial
fontStyle0-7Font stylefontStyle=1
alignleft, center, rightHorizontal alignmentalign=center
verticalAligntop, middle, bottomVertical alignmentverticalAlign=middle
whiteSpacewrap, nowrapText wrappingwhiteSpace=wrap
html0, 1Support HTML tagshtml=1
labelBackgroundColor#RRGGBBLabel background colorlabelBackgroundColor=#ffffff
labelBorderColor#RRGGBBLabel border colorlabelBorderColor=#cccccc
labelPositionleft, center, rightLabel positionlabelPosition=center
verticalLabelPositiontop, middle, bottomVertical label positionverticalLabelPosition=middle
spacingnumberText spacingspacing=2
spacingTopnumberTop spacingspacingTop=5
spacingLeftnumberLeft spacingspacingLeft=10
spacingBottomnumberBottom spacingspacingBottom=5
spacingRightnumberRight spacingspacingRight=10
textOpacity0-100Text opacitytextOpacity=90

Font Style Combinations

fontStyle ValueEffect
0Normal
1Bold
2Italic
3Bold + Italic
4Underline
5Bold + Underline
6Italic + Underline
7Bold + Italic + Underline

Text Effect Examples

<!-- Basic text -->
style="fontColor=#333333;fontSize=14;fontFamily=Arial;"

<!-- Bold centered -->
style="fontColor=#333333;fontSize=16;fontStyle=1;align=center;verticalAlign=middle;"

<!-- Background label -->
style="fontColor=#333333;fontSize=12;labelBackgroundColor=#ffffff;labelBorderColor=#cccccc;"

<!-- Top label -->
style="fontColor=#333333;fontSize=12;labelPosition=center;verticalLabelPosition=top;"

2.5 Edge/Arrow Styles

Style KeyValuesDescriptionExample
endArrownone, classic, block, open, oval, diamond, arrow, circle, async, boxEnd arrow styleendArrow=classic
endFill0, 1Whether end arrow is filledendFill=1
endSizenumberEnd arrow sizeendSize=12
startArrownone, classic, block, open, oval, diamond, arrow, circle, async, boxStart arrow stylestartArrow=classic
startFill0, 1Whether start arrow is filledstartFill=0
startSizenumberStart arrow sizestartSize=12
edgeStyleorthogonalEdgeStyle, entityRelationEdgeStyle, elbowEdgeStyle, sideToSideEdgeStyle, topToBottomEdgeStyle, segmentEdgeStyleEdge routing styleedgeStyle=orthogonalEdgeStyle
curved0, 1Whether curvedcurved=1
jumpStylenone, arc, gap, sharpCross jump stylejumpStyle=arc
jumpSizenumberCross jump sizejumpSize=8
rounded0, 1Rounded polylinerounded=1
orthogonalLoop0, 1Orthogonal looporthogonalLoop=1
jettySizenumber, autoConnection point offsetjettySize=auto
sourcePerimeterSpacingnumberSource perimeter spacingsourcePerimeterSpacing=5
targetPerimeterSpacingnumberTarget perimeter spacingtargetPerimeterSpacing=5
entryX0-1Entry X position (relative)entryX=0.5
entryY0-1Entry Y position (relative)entryY=0
exitX0-1Exit X position (relative)exitX=1
exitY0-1Exit Y position (relative)exitY=0.5

Arrow Type Illustration

Arrow TypeStyle ValueDescription
No arrowendArrow=noneStraight line
Classic arrowendArrow=classicStandard arrow
Block arrowendArrow=blockSolid block
Open arrowendArrow=openHollow arrow
Oval arrowendArrow=ovalCircular endpoint
Diamond arrowendArrow=diamondDiamond endpoint
Arrow shapeendArrow=arrowSimple arrow
Circle arrowendArrow=circleCircular endpoint
Async arrowendArrow=asyncOpen arrow (UML async)
Box arrowendArrow=boxBox endpoint

Edge Effect Examples

<!-- Simple arrow -->
style="endArrow=classic;html=1;strokeColor=#666666;"

<!-- Bidirectional arrow -->
style="startArrow=classic;startFill=1;endArrow=classic;endFill=1;strokeColor=#666666;"

<!-- Dashed connection -->
style="dashed=1;endArrow=none;strokeColor=#999999;"

<!-- Orthogonal polyline -->
style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;endArrow=classic;"

<!-- Curved connection -->
style="curved=1;endArrow=classic;strokeColor=#666666;"

<!-- Connection with jumps -->
style="jumpStyle=arc;jumpSize=8;endArrow=classic;strokeColor=#666666;"

2.6 Container/Grouping Styles

Style KeyValuesDescriptionExample
container0, 1Whether it's a containercontainer=1
collapsible0, 1Whether collapsiblecollapsible=1
foldable0, 1Whether foldablefoldable=1
startSizenumberTitle bar sizestartSize=30
horizontal0, 1Horizontal/Vertical layouthorizontal=1
swimlaneFillColor#RRGGBBSwimlane fill colorswimlaneFillColor=#f5f5f5
swimlaneLine0, 1Show swimlane separatorswimlaneLine=1
collapsible0, 1Whether collapsiblecollapsible=1
resizeWidth0, 1Allow width adjustmentresizeWidth=1
resizeHeight0, 1Allow height adjustmentresizeHeight=1
moveCells0, 1Include child elements when movingmoveCells=1
recursiveResize0, 1Recursive resizerecursiveResize=1
dropTarget0, 1Allow drag and dropdropTarget=1
pointerEvents0, 1Respond to mouse eventspointerEvents=1

2.7 Image Styles

Style KeyValuesDescriptionExample
shapeimageImage shapeshape=image
imageURLImage addressimage=https://example.com/icon.png
imageAspect0, 1Preserve image ratioimageAspect=1
imageBackground#RRGGBBImage background colorimageBackground=#ffffff
imageBorder#RRGGBBImage border colorimageBorder=#cccccc
flipH0, 1Horizontal flipflipH=1
flipV0, 1Vertical flipflipV=1
clip0, 1Clip imageclip=1

III. Color Schemes

3.1 Standard Color Schemes

Basic Color Series

Color NameHexadecimalSuggested UsePreview
Light Blue#dae8fcGeneral nodes, services#dae8fc
Dark Blue#6c8ebfBorders, emphasis#6c8ebf
Light Green#d5e8d4Success, normal state#d5e8d4
Dark Green#82b366Borders, confirmation#82b366
Light Yellow#fff2ccWarning, attention#fff2cc
Dark Yellow#d6b656Borders, warning#d6b656
Light Red#f8ceccError, danger#f8cecc
Dark Red#b85450Borders, error#b85450
Light Purple#e1d5e7Data, storage#e1d5e7
Dark Purple#9673a6Borders, data#9673a6
Gray#f5f5f5Background, grouping#f5f5f5
Dark Gray#666666Borders, text#666666

Extended Color Series

Color NameHexadecimalSuggested Use
Sky Blue#b0e0e6Fresh, tech
Mint Green#98fb98Eco, health
Coral Red#f08080Vitality, eye-catching
Gold#ffd700Premium, reward
Orange#ffa500Creativity, vitality
Pink#ffc0cbSoft, feminine
Cyan#00ffffModern, cool
Brown#d2691eNatural, traditional
Black#000000Formal, emphasis
White#ffffffClean, pure

3.2 Semantic Color Schemes

Flowchart Color Scheme

SemanticFill ColorBorder ColorText ColorDescription
Start/End#d5e8d4#82b366#333333Ellipse shape
Process Step#dae8fc#6c8ebf#333333Rectangle
Decision#fff2cc#d6b656#333333Rhombus
Input/Output#e1d5e7#9673a6#333333Parallelogram
Exception Handling#f8cecc#b85450#333333Rectangle
Sub-process#f5f5f5#666666#333333Double rectangle

System Architecture Color Scheme

Component TypeFill ColorBorder ColorDescription
User/Client#dae8fc#6c8ebfBlue series
Gateway/Load Balancer#d5e8d4#82b366Green series
Microservice#fff2cc#d6b656Yellow series
Database#e1d5e7#9673a6Purple series
Cache#ffe6cc#d79b00Orange series
Message Queue#f8cecc#b85450Red series
External Service#f5f5f5#666666Gray series
Monitoring/Logging#e6f3ff#0075e9Sky blue series

Network Topology Color Scheme

Device TypeFill ColorBorder ColorDescription
Internet/Cloud#f5f5f5#666666Gray
Firewall/Security#f8cecc#b85450Red
Router#fff2cc#d6b656Yellow
Switch#e1d5e7#9673a6Purple
Server#dae8fc#6c8ebfBlue
Workstation#d5e8d4#82b366Green
Wireless Device#ffe6cc#d79b00Orange

UML Color Scheme

UML ElementFill ColorBorder ColorDescription
Class#dae8fc#6c8ebfBlue
Interface#fff2cc#d6b656Yellow
Abstract Class#e1d5e7#9673a6Purple
Enum#d5e8d4#82b366Green
Package#f5f5f5#666666Gray
Comment#ffff88#36393dYellow

3.3 Theme Color Schemes

Dark Theme

ElementFill ColorBorder ColorText Color
Background#2d2d2d--
Primary Node#3d5a80#98c1d9#ffffff
Secondary Node#457b9d#a8dadc#ffffff
Emphasized Node#e63946#f1faee#ffffff
Success Node#2a9d8f#e9c46a#ffffff
Warning Node#f4a261#e76f51#ffffff
Connection Line#a8dadc-#ffffff

Light Theme

ElementFill ColorBorder ColorText Color
Background#ffffff--
Primary Node#e3f2fd#1976d2#333333
Secondary Node#f3e5f5#7b1fa2#333333
Emphasized Node#ffebee#c62828#333333
Success Node#e8f5e9#2e7d32#333333
Warning Node#fff3e0#ef6c00#333333
Connection Line#90a4ae-#333333

Business Theme

ElementFill ColorBorder ColorText Color
Background#fafafa--
Strategic Layer#1e3a5f#2c5282#ffffff
Tactical Layer#2d5a87#3d7ab8#ffffff
Execution Layer#4a7fb5#6ba3d8#ffffff
Support Layer#7da8c8#a0c4e0#333333
External#c5d5e5#e0eaf5#333333

IV. Visual Effects

4.1 Shadow Effects

Basic Shadow

<mxCell id="shadow1" value="Shadow Effect" vertex="1" parent="1"
  style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;shadow=1;">
  <mxGeometry x="100" y="100" width="120" height="60" as="geometry"/>
</mxCell>

Multi-layer Shadow Effect

Achieved by stacking multiple elements:

<!-- Shadow layer -->
<mxCell id="shadow-bg" value="" vertex="1" parent="1"
  style="rounded=1;whiteSpace=wrap;html=1;fillColor=#999999;strokeColor=none;opacity=30;">
  <mxGeometry x="105" y="105" width="120" height="60" as="geometry"/>
</mxCell>

<!-- Main layer -->
<mxCell id="shadow-main" value="Multi-layer Shadow" vertex="1" parent="1"
  style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;">
  <mxGeometry x="100" y="100" width="120" height="60" as="geometry"/>
</mxCell>

4.2 Gradient Effects

Linear Gradient

<!-- Gradient from top to bottom -->
<mxCell id="gradient1" value="Vertical Gradient" vertex="1" parent="1"
  style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;gradientColor=#ffffff;gradientDirection=south;">
  <mxGeometry x="100" y="100" width="120" height="60" as="geometry"/>
</mxCell>

<!-- Gradient from left to right -->
<mxCell id="gradient2" value="Horizontal Gradient" vertex="1" parent="1"
  style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;gradientColor=#ffffff;gradientDirection=east;">
  <mxGeometry x="250" y="100" width="120" height="60" as="geometry"/>
</mxCell>

Multi-color Gradient Simulation

<!-- Use multiple elements to simulate multi-color gradient -->
<mxCell id="multi-gradient" value="Multi-color Gradient" vertex="1" parent="1"
  style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ff6b6b;gradientColor=#4ecdc4;gradientDirection=south;">
  <mxGeometry x="400" y="100" width="120" height="60" as="geometry"/>
</mxCell>

4.3 Glass/Gloss Effect

<mxCell id="glass1" value="Glass Effect" vertex="1" parent="1"
  style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;glass=1;">
  <mxGeometry x="100" y="200" width="120" height="60" as="geometry"/>
</mxCell>

4.4 Hand-drawn Style

<mxCell id="sketch1" value="Hand-drawn Style" vertex="1" parent="1"
  style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;sketch=1;roughness=2;hachureGap=5;">
  <mxGeometry x="250" y="200" width="120" height="60" as="geometry"/>
</mxCell>

Hand-drawn Style Parameters

ParameterValuesDescription
sketch0, 1Enable hand-drawn style
roughness0-10Roughness, higher value means rougher
hachureGapnumberFill line spacing
hachureAngle0-360Fill line angle
fillWeightnumberFill line thickness
bowingnumberLine curvature

4.5 3D Effects

3D Button Effect

<!-- Bottom shadow layer -->
<mxCell id="btn-shadow" value="" vertex="1" parent="1"
  style="rounded=1;whiteSpace=wrap;html=1;fillColor=#4a5568;strokeColor=none;">
  <mxGeometry x="102" y="302" width="120" height="60" as="geometry"/>
</mxCell>

<!-- Main layer -->
<mxCell id="btn-main" value="3D Button" vertex="1" parent="1"
  style="rounded=1;whiteSpace=wrap;html=1;fillColor=#63b3ed;strokeColor=#4299e1;gradientColor=#3182ce;gradientDirection=south;">
  <mxGeometry x="100" y="300" width="120" height="60" as="geometry"/>
</mxCell>

3D Card Effect

<!-- Shadow layer -->
<mxCell id="card-shadow" value="" vertex="1" parent="1"
  style="rounded=1;whiteSpace=wrap;html=1;fillColor=#000000;strokeColor=none;opacity=20;">
  <mxGeometry x="252" y="302" width="120" height="80" as="geometry"/>
</mxCell>

<!-- Main layer -->
<mxCell id="card-main" value="3D Card" vertex="1" parent="1"
  style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e2e8f0;shadow=1;">
  <mxGeometry x="250" y="300" width="120" height="80" as="geometry"/>
</mxCell>

4.6 Glow Effect

<!-- Glow layer -->
<mxCell id="glow-bg" value="" vertex="1" parent="1"
  style="rounded=1;whiteSpace=wrap;html=1;fillColor=#00ff00;strokeColor=none;opacity=30;strokeWidth=10;">
  <mxGeometry x="95" y="395" width="130" height="70" as="geometry"/>
</mxCell>

<!-- Main layer -->
<mxCell id="glow-main" value="Glow Effect" vertex="1" parent="1"
  style="rounded=1;whiteSpace=wrap;html=1;fillColor=#48bb78;strokeColor=#38a169;">
  <mxGeometry x="100" y="400" width="120" height="60" as="geometry"/>
</mxCell>

4.7 Rounded Corner Effects

Different Rounded Corner Degrees

<!-- Small rounded corners -->
<mxCell id="rounded-small" value="Small Rounded" vertex="1" parent="1"
  style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;">
  <mxGeometry x="100" y="500" width="100" height="50" as="geometry"/>
</mxCell>

<!-- Medium rounded corners -->
<mxCell id="rounded-medium" value="Medium Rounded" vertex="1" parent="1"
  style="rounded=1;arcSize=30;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;">
  <mxGeometry x="220" y="500" width="100" height="50" as="geometry"/>
</mxCell>

<!-- Large rounded corners (capsule) -->
<mxCell id="rounded-large" value="Capsule" vertex="1" parent="1"
  style="rounded=1;arcSize=50;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;">
  <mxGeometry x="340" y="500" width="120" height="50" as="geometry"/>
</mxCell>

V. Style Combination Templates

5.1 Button Styles

Primary Button

rounded=1;whiteSpace=wrap;html=1;fillColor=#3b82f6;strokeColor=#2563eb;fontColor=#ffffff;fontSize=14;fontStyle=1;shadow=1;

Secondary Button

rounded=1;whiteSpace=wrap;html=1;fillColor=#e5e7eb;strokeColor=#d1d5db;fontColor=#374151;fontSize=14;

Success Button

rounded=1;whiteSpace=wrap;html=1;fillColor=#10b981;strokeColor=#059669;fontColor=#ffffff;fontSize=14;fontStyle=1;

Danger Button

rounded=1;whiteSpace=wrap;html=1;fillColor=#ef4444;strokeColor=#dc2626;fontColor=#ffffff;fontSize=14;fontStyle=1;

Warning Button

rounded=1;whiteSpace=wrap;html=1;fillColor=#f59e0b;strokeColor=#d97706;fontColor=#ffffff;fontSize=14;fontStyle=1;

5.2 Card Styles

Standard Card

rounded=1;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e5e7eb;shadow=1;

Hover Effect Card

rounded=1;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#3b82f6;strokeWidth=2;shadow=1;

Selected State Card

rounded=1;whiteSpace=wrap;html=1;fillColor=#eff6ff;strokeColor=#3b82f6;strokeWidth=2;

5.3 Label Styles

Info Label

rounded=1;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#3b82f6;fontColor=#1e40af;fontSize=12;

Success Label

rounded=1;whiteSpace=wrap;html=1;fillColor=#d1fae5;strokeColor=#10b981;fontColor=#065f46;fontSize=12;

Warning Label

rounded=1;whiteSpace=wrap;html=1;fillColor=#fef3c7;strokeColor=#f59e0b;fontColor=#92400e;fontSize=12;

Error Label

rounded=1;whiteSpace=wrap;html=1;fillColor=#fee2e2;strokeColor=#ef4444;fontColor=#991b1b;fontSize=12;

Neutral Label

rounded=1;whiteSpace=wrap;html=1;fillColor=#f3f4f6;strokeColor=#9ca3af;fontColor=#4b5563;fontSize=12;

5.4 Input Box Styles

Standard Input Box

rounded=1;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#d1d5db;fontColor=#374151;

Focused Input Box

rounded=1;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#3b82f6;strokeWidth=2;fontColor=#374151;

Disabled Input Box

rounded=1;whiteSpace=wrap;html=1;fillColor=#f3f4f6;strokeColor=#e5e7eb;fontColor=#9ca3af;

5.5 Connection Line Styles

Standard Connection

endArrow=classic;html=1;strokeColor=#6b7280;strokeWidth=1;

Emphasized Connection

endArrow=classic;html=1;strokeColor=#3b82f6;strokeWidth=2;

Dashed Connection

dashed=1;endArrow=classic;html=1;strokeColor=#9ca3af;strokeWidth=1;

Data Flow Connection

endArrow=block;endFill=1;html=1;strokeColor=#10b981;strokeWidth=2;

Control Flow Connection

endArrow=open;html=1;strokeColor=#f59e0b;strokeWidth=2;

VI. Advanced Beautification Techniques

6.1 Icon Integration

Using Built-in Icons

<mxCell id="icon1" value="" vertex="1" parent="1"
  style="shape=mxgraph.azure.user;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;">
  <mxGeometry x="100" y="100" width="50" height="50" as="geometry"/>
</mxCell>

Using Image Icons

<mxCell id="icon2" value="" vertex="1" parent="1"
  style="shape=image;image=https://cdn-icons-png.flaticon.com/512/25/25231.png;whiteSpace=wrap;html=1;">
  <mxGeometry x="200" y="100" width="50" height="50" as="geometry"/>
</mxCell>

Icon Library Reference

Library NamePrefixExamples
Azuremxgraph.azureuser, server, database
AWSmxgraph.awscompute, storage, network
Ciscomxgraph.ciscorouter, switch, firewall
GCPmxgraph.gcpcompute_engine, cloud_storage
Kubernetesmxgraph.k8spod, service, deployment

6.2 Text Typography

Multi-line Text

<mxCell id="multiline" value="First Line&#xa;Second Line&#xa;Third Line" vertex="1" parent="1"
  style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;align=left;verticalAlign=top;spacingLeft=10;spacingTop=10;">
  <mxGeometry x="100" y="200" width="150" height="100" as="geometry"/>
</mxCell>

HTML Rich Text

<mxCell id="richtext" value="&lt;b&gt;Bold Title&lt;/b&gt;&lt;br&gt;&lt;i&gt;Italic Description&lt;/i&gt;&lt;br&gt;&lt;font color=&apos;#ff0000&apos;&gt;Red Text&lt;/font&gt;" vertex="1" parent="1"
  style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#cccccc;">
  <mxGeometry x="300" y="200" width="150" height="100" as="geometry"/>
</mxCell>

Text Alignment Combinations

Horizontal AlignmentVertical AlignmentEffect
align=leftverticalAlign=topTop-left
align=centerverticalAlign=topTop-center
align=rightverticalAlign=topTop-right
align=leftverticalAlign=middleLeft-center
align=centerverticalAlign=middleCenter
align=rightverticalAlign=middleRight-center
align=leftverticalAlign=bottomBottom-left
align=centerverticalAlign=bottomBottom-center
align=rightverticalAlign=bottomBottom-right

6.3 Combination Effects

Button with Icon

<!-- Icon -->
<mxCell id="btn-icon" value="" vertex="1" parent="1"
  style="shape=image;image=data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23ffffff' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E;whiteSpace=wrap;html=1;">
  <mxGeometry x="110" y="310" width="20" height="20" as="geometry"/>
</mxCell>

<!-- Button background -->
<mxCell id="btn-bg" value="Confirm Submit" vertex="1" parent="1"
  style="rounded=1;whiteSpace=wrap;html=1;fillColor=#10b981;strokeColor=#059669;fontColor=#ffffff;fontSize=14;fontStyle=1;align=center;spacingLeft=25;">
  <mxGeometry x="100" y="300" width="120" height="40" as="geometry"/>
</mxCell>

Card with Avatar

<!-- Avatar -->
<mxCell id="avatar" value="" vertex="1" parent="1"
  style="shape=ellipse;whiteSpace=wrap;html=1;fillColor=#e2e8f0;strokeColor=#cbd5e0;aspect=fixed;">
  <mxGeometry x="110" y="410" width="40" height="40" as="geometry"/>
</mxCell>

<!-- Card -->
<mxCell id="profile-card" value="&lt;b&gt;Username&lt;/b&gt;&lt;br&gt;&lt;font size=&apos;11&apos; color=&apos;%23666666&apos;&gt;[email protected]&lt;/font&gt;" vertex="1" parent="1"
  style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e2e8f0;shadow=1;align=left;spacingLeft=60;verticalAlign=middle;">
  <mxGeometry x="100" y="400" width="200" height="60" as="geometry"/>
</mxCell>

6.4 Dynamic Effect Simulation

Hover Effect (Static Representation)

<!-- Normal state -->
<mxCell id="hover-normal" value="Before Hover" vertex="1" parent="1"
  style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#d1d5db;">
  <mxGeometry x="100" y="500" width="100" height="40" as="geometry"/>
</mxCell>

<!-- Hover state -->
<mxCell id="hover-active" value="After Hover" vertex="1" parent="1"
  style="rounded=1;whiteSpace=wrap;html=1;fillColor=#eff6ff;strokeColor=#3b82f6;strokeWidth=2;shadow=1;">
  <mxGeometry x="220" y="500" width="100" height="40" as="geometry"/>
</mxCell>

Selected Effect

<mxCell id="selected" value="Selected State" vertex="1" parent="1"
  style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dbeafe;strokeColor=#3b82f6;strokeWidth=3;">
  <mxGeometry x="340" y="500" width="100" height="40" as="geometry"/>
</mxCell>

VII. Best Practices

7.1 Consistency Principle

  1. Unified Color Scheme: Use no more than 5 main colors throughout the chart
  2. Unified Shapes: Use the same shape for similar elements
  3. Unified Fonts: Use 1-2 fonts throughout the chart
  4. Unified Spacing: Maintain consistent element spacing

7.2 Hierarchy Principle

  1. Color Depth: Use dark colors for important elements, light colors for secondary elements
  2. Size Contrast: Important elements have larger sizes
  3. Position Emphasis: Place important elements in the visual center

7.3 Readability Principle

  1. Contrast: Text and background contrast must be sufficient
  2. Font Size: Body text no less than 12px, headings no less than 14px
  3. Whitespace: Maintain appropriate whitespace around elements

7.4 Style Naming Convention

It's recommended to create naming conventions for common styles:

/* Basic styles */
style-base: rounded=1;whiteSpace=wrap;html=1;

/* Color variants */
style-primary: fillColor=#3b82f6;strokeColor=#2563eb;fontColor=#ffffff;
style-success: fillColor=#10b981;strokeColor=#059669;fontColor=#ffffff;
style-warning: fillColor=#f59e0b;strokeColor=#d97706;fontColor=#ffffff;
style-danger: fillColor=#ef4444;strokeColor=#dc2626;fontColor=#ffffff;

/* Size variants */
size-small: fontSize=12;spacing=2;
size-normal: fontSize=14;spacing=4;
size-large: fontSize=16;spacing=6;

/* Effect variants */
effect-shadow: shadow=1;
effect-gradient: gradientColor=#ffffff;gradientDirection=south;

7.5 Performance Optimization

  1. Avoid Too Many Effects: Don't use multiple effects like shadow, gradient, and glass simultaneously on a single element
  2. Simplify Styles: Remove unused style attributes
  3. Reuse Styles: Use the same style string for elements with the same style

VIII. Style Quick Reference Card

8.1 Common Style Quick Reference

EffectStyle Code
Rounded Rectanglerounded=1;
Circleellipse;aspect=fixed;
Shadowshadow=1;
GradientgradientColor=#ffffff;gradientDirection=south;
Glassglass=1;
Hand-drawnsketch=1;roughness=2;
BoldfontStyle=1;
Centeralign=center;verticalAlign=middle;
ArrowendArrow=classic;
Dasheddashed=1;

8.2 Color Quick Reference

PurposeFill ColorBorder Color
Primary#3b82f6#2563eb
Success#10b981#059669
Warning#f59e0b#d97706
Danger#ef4444#dc2626
Info#3b82f6#2563eb
Neutral#6b7280#4b5563
Light#f3f4f6#d1d5db

8.3 Size Quick Reference

Element TypeRecommended WidthRecommended HeightFont Size
Small Button80px32px12px
Standard Button120px40px14px
Large Button160px48px16px
Small Card150px80px12px
Standard Card200px120px14px
Large Card280px160px14px
Icon32-64px32-64px-
Avatar40-80px40-80px-

X. Summary

This document provides a comprehensive guide to draw.io appearance beautification, including:

  1. Style Basics: Syntax rules and inheritance mechanisms
  2. Complete Property Reference: Detailed descriptions of 8 major style attribute categories
  3. Color Schemes: Standard color series, semantic color schemes, and theme color schemes
  4. Visual Effects: Shadow, gradient, glass, hand-drawn, 3D, and other effects
  5. Style Templates: Common templates for buttons, cards, labels, input boxes, and connection lines
  6. Advanced Techniques: Icon integration, text typography, combination effects, and dynamic effect simulation
  7. Best Practices: Consistency, hierarchy, readability principles, and performance optimization
  8. Quick Reference: Quick reference tables for common styles, colors, and sizes

By properly applying these beautification techniques, you can create professional, beautiful, and readable charts.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.