Below is a detailed SVG (Scalable Vector Graphics) code for a stylized robot. This robot has a boxy body, a head with antenna, arms, legs, and some decorative elements like buttons and a display screen. The SVG is designed to be visually appealing and can be customized further by adjusting colors, sizes, or adding more details.
<svg width="400" height="500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 500">
<!-- Background (optional) -->
<rect width="400" height="500" fill="#f0f0f0"/>
<!-- Robot Body -->
<rect x="150" y="150" width="100" height="150" fill="#6b7280" rx="10"/>
<!-- Robot Head -->
<rect x="160" y="100" width="80" height="50" fill="#9ca3af" rx="5"/>
<!-- Antenna -->
<line x1="200" y1="100" x2="200" y2="70" stroke="#4b5563" stroke-width="4"/>
<circle cx="200" cy="65" r="5" fill="#ef4444"/>
<!-- Eyes -->
<circle cx="180" cy="120" r="6" fill="#ffffff"/>
<circle cx="180" cy="120" r="3" fill="#000000"/>
<circle cx="220" cy="120" r="6" fill="#ffffff"/>
<circle cx="220" cy="120" r="3" fill="#000000"/>
<!-- Mouth (Display) -->
<rect x="185" y="130" width="30" height="10" fill="#000000" rx="2"/>
<text x="195" y="138" font-size="8" fill="#00ff00" text-anchor="middle">0101</text>
<!-- Arms -->
<!-- Left Arm -->
<rect x="120" y="160" width="30" height="80" fill="#4b5563" rx="5"/>
<rect x="110" y="240" width="20" height="20" fill="#ef4444" rx="5"/> <!-- Hand -->
<!-- Right Arm -->
<rect x="250" y="160" width="30" height="80" fill="#4b5563" rx="5"/>
<rect x="270" y="240" width="20" height="20" fill="#ef4444" rx="5"/> <!-- Hand -->
<!-- Legs -->
<!-- Left Leg -->
<rect x="160" y="300" width="30" height="100" fill="#4b5563" rx="5"/>
<rect x="150" y="400" width="40" height="20" fill="#ef4444" rx="5"/> <!-- Foot -->
<!-- Right Leg -->
<rect x="210" y="300" width="30" height="100" fill="#4b5563" rx="5"/>
<rect x="210" y="400" width="40" height="20" fill="#ef4444" rx="5"/> <!-- Foot -->
<!-- Chest Details (Buttons and Panel) -->
<rect x="170" y="170" width="60" height="40" fill="#4b5563" rx="5"/>
<circle cx="190" cy="190" r="5" fill="#ef4444"/>
<circle cx="210" cy="190" r="5" fill="#22c55e"/>
<rect x="175" y="220" width="50" height="20" fill="#000000" rx="2"/>
<text x="200" y="233" font-size="8" fill="#00ff00" text-anchor="middle">ROBO</text>
<!-- Shadows for Depth -->
<rect x="150" y="150" width="100" height="150" fill="rgba(0, 0, 0, 0.2)" rx="10" filter="blur(5px)"/>
<rect x="160" y="100" width="80" height="50" fill="rgba(0, 0, 0, 0.2)" rx="5" filter="blur(5px)"/>
<!-- Ground Shadow -->
<ellipse cx="200" cy="450" rx="80" ry="20" fill="rgba(0, 0, 0, 0.3)"/>
</svg>
Explanation of the SVG Elements:
- Background: A light gray rectangle serves as the background for the robot.
- Body: A rounded rectangle forms the main body of the robot, colored in a metallic gray.
- Head: A smaller rounded rectangle on top of the body, with a lighter gray color.
- Antenna: A line with a red circle on top, giving the robot a classic sci-fi look.
- Eyes: Two white circles with black pupils, giving the robot a friendly expression.
- Mouth/Display: A small black rectangle with green binary text (
0101) to simulate a digital display.
- Arms: Two rectangular arms with rounded ends, each with a red hand for contrast.
- Legs: Two sturdy rectangular legs with red feet, ensuring the robot looks stable.
- Chest Details: A panel with two buttons (red and green) and a small display screen with the text "ROBO".
- Shadows: Subtle shadows are added using blurred rectangles and an ellipse for the ground shadow, giving the robot a 3D effect.
How to Use This SVG:
- Copy and Paste: Copy the code above into a
.svg file (e.g., robot.svg) and open it in a web browser or vector graphics editor (like Inkscape or Adobe Illustrator).
- Embed in HTML: You can embed the SVG directly in an HTML file using the
<svg> tag or link to the .svg file using an <img> tag.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Robot SVG</title>
</head>
<body>
<!-- Paste the SVG code here -->
</body>
</html>
- Customize: Modify the colors, sizes, or shapes by adjusting the attributes in the SVG code (e.g.,
fill, width, height, etc.).
This robot design is simple yet detailed, making it a great starting point for further customization or animation!