# hexagon Icon

> The hexagon icon from Material Symbols as Compose ImageVector Kotlin code, Android Vector Drawable XML and SVG.

- Library: [Material Symbols](https://composables.com/icons/icon-libraries/material-symbols.md)
- License: Apache 2.0 (full text in the [Material Symbols library page](https://composables.com/icons/icon-libraries/material-symbols.md))
- Styles: [Outlined](https://composables.com/icons/icon-libraries/material-symbols/hexagon.md?v=outlined), [Rounded](https://composables.com/icons/icon-libraries/material-symbols/hexagon.md?v=rounded), [Sharp](https://composables.com/icons/icon-libraries/material-symbols/hexagon.md?v=sharp), [Outlined Filled](https://composables.com/icons/icon-libraries/material-symbols/hexagon.md?v=outlined-filled), [Rounded Filled](https://composables.com/icons/icon-libraries/material-symbols/hexagon.md?v=rounded-filled), [Sharp Filled](https://composables.com/icons/icon-libraries/material-symbols/hexagon.md?v=sharp-filled)

## Compose ImageVector (Kotlin)

For Jetpack Compose and Compose Multiplatform. Download: `https://composables.com/download/icons/material-symbols/hexagon.kt`

```kotlin
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.SolidColor
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.graphics.vector.path
import androidx.compose.ui.unit.dp

val MaterialSymbolsHexagon: ImageVector
    get() {
        if (_MaterialSymbolsHexagon != null) return _MaterialSymbolsHexagon!!
        
        _MaterialSymbolsHexagon = ImageVector.Builder(
            name = "hexagon",
            defaultWidth = 24.dp,
            defaultHeight = 24.dp,
            viewportWidth = 960f,
            viewportHeight = 960f
        ).apply {
            path(
                fill = SolidColor(Color.Black)
            ) {
                moveTo(272f, 840f)
                lineTo(64f, 480f)
                lineToRelative(208f, -360f)
                horizontalLineToRelative(416f)
                lineToRelative(208f, 360f)
                lineToRelative(-208f, 360f)
                horizontalLineTo(272f)
                close()
                moveToRelative(46f, -80f)
                horizontalLineToRelative(324f)
                lineToRelative(161f, -280f)
                lineToRelative(-161f, -280f)
                horizontalLineTo(318f)
                lineTo(156f, 480f)
                lineToRelative(162f, 280f)
                close()
                moveToRelative(162f, -280f)
                close()
            }
        }.build()
        
        return _MaterialSymbolsHexagon!!
    }

private var _MaterialSymbolsHexagon: ImageVector? = null
```

## Android Vector Drawable (XML)

Download: `https://composables.com/download/icons/material-symbols/hexagon.xml`

```xml
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24dp"
    android:height="24dp"
    android:viewportWidth="960"
    android:viewportHeight="960">
    <path
        android:fillColor="@android:color/black"
        android:pathData="M272,840L64,480l208,-360h416l208,360l-208,360H272Zm46,-80h324l161,-280l-161,-280H318L156,480l162,280Zm162,-280Z" />
</vector>
```

## SVG

Download: `https://composables.com/download/icons/material-symbols/hexagon.svg`

```svg
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="currentColor"><path d="M272-120 64-480l208-360h416l208 360-208 360H272Zm46-80h324l161-280-161-280H318L156-480l162 280Zm162-280Z"/></svg>
```
