Creating a detailed and realistic butterfly purely with SVG code is quite complex, but I can provide you with a detailed SVG example that includes gradients, shapes, and patterns to give a realistic and colorful butterfly appearance. You can further customize it or use it as a base for more complexity.
Here is an SVG code for a detailed and colorful butterfly:
<svg
width="400"
height="400"
viewBox="0 0 400 400"
xmlns="http://www.w3.org/2000/svg"
role="img"
aria-label="Detailed realistic butterfly"
>
<defs>
<!-- Gradient for wings -->
<radialGradient id="wingGradient" cx="50%" cy="50%" r="60%">
<stop offset="0%" stop-color="#ffcc00" />
<stop offset="50%" stop-color="#ff6600" />
<stop offset="100%" stop-color="#990000" />
</radialGradient>
<!-- Gradient for wing spots -->
<radialGradient id="spotGradient" cx="50%" cy="50%" r="50%">
<stop offset="0%" stop-color="#fff" stop-opacity="0.8" />
<stop offset="100%" stop-color="#000" stop-opacity="0.6" />
</radialGradient>
<!-- Pattern for wing texture -->
<pattern id="wingTexture" x="0" y="0" width="10" height="10" patternUnits="userSpaceOnUse">
<circle cx="2" cy="2" r="1" fill="rgba(255,255,255,0.2)" />
<circle cx="7" cy="7" r="1" fill="rgba(0,0,0,0.1)" />
</pattern>
<!-- Body gradient -->
<linearGradient id="bodyGradient" x1="0" y1="0" x2="0" y2="1">
<stop offset="0%" stop-color="#333" />
<stop offset="100%" stop-color="#111" />
</linearGradient>
</defs>
<!-- Body -->
<ellipse cx="200" cy="200" rx="15" ry="60" fill="url(#bodyGradient)" />
<ellipse cx="200" cy="140" rx="10" ry="20" fill="#222" />
<ellipse cx="200" cy="260" rx="10" ry="20" fill="#222" />
<!-- Antennae -->
<path d="M190 120 Q180 100 170 90" stroke="#222" stroke-width="3" fill="none" />
<path d="M210 120 Q220 100 230 90" stroke="#222" stroke-width="3" fill="none" />
<!-- Left upper wing -->
<path
d="M200 180
C 100 100, 50 200, 150 250
C 130 230, 140 210, 200 180"
fill="url(#wingGradient)"
stroke="#660000"
stroke-width="2"
/>
<path
d="M150 250 C 130 230, 140 210, 200 180"
fill="url(#wingTexture)"
opacity="0.3"
/>
<!-- Left lower wing -->
<path
d="M200 220
C 120 250, 100 320, 170 310
C 160 290, 180 270, 200 220"
fill="url(#wingGradient)"
stroke="#660000"
stroke-width="2"
/>
<path
d="M170 310 C 160 290, 180 270, 200 220"
fill="url(#wingTexture)"
opacity="0.3"
/>
<!-- Right upper wing -->
<path
d="M200 180
C 300 100, 350 200, 250 250
C 270 230, 260 210, 200 180"
fill="url(#wingGradient)"
stroke="#660000"
stroke-width="2"
/>
<path
d="M250 250 C 270 230, 260 210, 200 180"
fill="url(#wingTexture)"
opacity="0.3"
/>
<!-- Right lower wing -->
<path
d="M200 220
C 280 250, 300 320, 230 310
C 240 290, 220 270, 200 220"
fill="url(#wingGradient)"
stroke="#660000"
stroke-width="2"
/>
<path
d="M230 310 C 240 290, 220 270, 200 220"
fill="url(#wingTexture)"
opacity="0.3"
/>
<!-- Wing spots -->
<circle cx="130" cy="180" r="12" fill="url(#spotGradient)" />
<circle cx="270" cy="180" r="12" fill="url(#spotGradient)" />
<circle cx="150" cy="280" r="8" fill="url(#spotGradient)" />
<circle cx="250" cy="280" r="8" fill="url(#spotGradient)" />
<!-- Wing veins -->
<path d="M200 180 L 150 250" stroke="#330000" stroke-width="1" />
<path d="M200 180 L 250 250" stroke="#330000" stroke-width="1" />
<path d="M200 220 L 170 310" stroke="#330000" stroke-width="1" />
<path d="M200 220 L 230 310" stroke="#330000" stroke-width="1" />
<path d="M200 180 L 130 180" stroke="#330000" stroke-width="1" />
<path d="M200 180 L 270 180" stroke="#330000" stroke-width="1" />
</svg>
Explanation:
- The butterfly body is made of ellipses with a dark gradient.
- The wings use cubic Bezier curves (
C) to create smooth, natural shapes.
- Gradients and patterns add depth and texture to the wings.
- Spots and veins are added for realism.
- Antennae are simple curved lines.
You can open this SVG code in any modern browser or vector editor (like Inkscape or Adobe Illustrator) to see the butterfly.
If you want it even more realistic, you might consider using SVG filters or embedding bitmap textures, but this is a good vector-based start! Let me know if you want it more complex or stylized.