# octagon icon

Octagon. Gentleface icon, drawn on the 16 px pixel grid. Free, MIT licensed. Page: https://gentleface.com/icons/octagon

- Category: Shapes
- Use it for: octagon
- Tags: octagon, shape, polygon, eight-sided, stop-sign, geometry
- Component name: OctagonIcon
- Added: 2026-10-14

## Alternatives

- `alert-octagon`: a stop or a critical error, the octagon with a sign (alert-octagon)

## Files

Each SVG is 16 × 16 with fill="currentColor". Keep it at 16 px or an exact multiple (32, 48) on whole pixels: a fractional size or position blurs it.

- line-round: https://gentleface.com/svg/line-round/16/octagon.svg · PNG https://gentleface.com/png/line-round/16/octagon.png · https://gentleface.com/png/line-round/32/octagon.png · https://gentleface.com/png/line-round/48/octagon.png
- line-soft: https://gentleface.com/svg/line-soft/16/octagon.svg · PNG https://gentleface.com/png/line-soft/16/octagon.png · https://gentleface.com/png/line-soft/32/octagon.png · https://gentleface.com/png/line-soft/48/octagon.png
- line-sharp: https://gentleface.com/svg/line-sharp/16/octagon.svg · PNG https://gentleface.com/png/line-sharp/16/octagon.png · https://gentleface.com/png/line-sharp/32/octagon.png · https://gentleface.com/png/line-sharp/48/octagon.png
- solid-round: https://gentleface.com/svg/solid-round/16/octagon.svg · PNG https://gentleface.com/png/solid-round/16/octagon.png · https://gentleface.com/png/solid-round/32/octagon.png · https://gentleface.com/png/solid-round/48/octagon.png
- solid-soft: https://gentleface.com/svg/solid-soft/16/octagon.svg · PNG https://gentleface.com/png/solid-soft/16/octagon.png · https://gentleface.com/png/solid-soft/32/octagon.png · https://gentleface.com/png/solid-soft/48/octagon.png
- solid-sharp: https://gentleface.com/svg/solid-sharp/16/octagon.svg · PNG https://gentleface.com/png/solid-sharp/16/octagon.png · https://gentleface.com/png/solid-sharp/32/octagon.png · https://gentleface.com/png/solid-sharp/48/octagon.png

The SVG of every style: https://gentleface.com/icons/octagon.json (`svg`).

## Code (line-round)

The snippets are decorative (aria-hidden). For an icon that carries meaning on its own, such as an icon-only button, label the button, or give the SVG role="img" and an aria-label. For another style, take its SVG from the JSON and swap the path `d`.

### SVG

```svg
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M13.778 5.385C13.926 5.742 14 6.114 14 6.5L14 9.5C14 9.886 13.926 10.258 13.778 10.615C13.63 10.972 13.42 11.287 13.146 11.561L11.561 13.146C11.287 13.42 10.972 13.63 10.615 13.778C10.258 13.926 9.886 14 9.5 14L6.5 14C6.114 14 5.742 13.926 5.385 13.778C5.028 13.63 4.713 13.42 4.439 13.146L2.854 11.561C2.58 11.287 2.37 10.972 2.222 10.615C2.074 10.258 2 9.886 2 9.5L2 6.5C2 6.114 2.074 5.742 2.222 5.385C2.37 5.028 2.58 4.713 2.854 4.439L4.439 2.854C4.713 2.58 5.028 2.37 5.385 2.222C5.742 2.074 6.114 2 6.5 2L9.5 2C9.886 2 10.258 2.074 10.615 2.222C10.972 2.37 11.287 2.58 11.561 2.854L13.146 4.439C13.42 4.713 13.63 5.028 13.778 5.385ZM3.146 5.767C3.049 6.002 3 6.246 3 6.5L3 9.5C3 9.754 3.049 9.998 3.146 10.233C3.243 10.467 3.381 10.674 3.561 10.854L5.146 12.439C5.326 12.619 5.533 12.757 5.767 12.854C6.002 12.951 6.246 13 6.5 13L9.5 13C9.754 13 9.998 12.951 10.233 12.854C10.467 12.757 10.674 12.619 10.854 12.439L12.439 10.854C12.619 10.674 12.757 10.467 12.854 10.233C12.951 9.998 13 9.754 13 9.5L13 6.5C13 6.246 12.951 6.002 12.854 5.767C12.757 5.533 12.619 5.326 12.439 5.146L10.854 3.561C10.674 3.381 10.467 3.243 10.233 3.146C9.998 3.049 9.754 3 9.5 3L6.5 3C6.246 3 6.002 3.049 5.767 3.146C5.533 3.243 5.326 3.381 5.146 3.561L3.561 5.146C3.381 5.326 3.243 5.533 3.146 5.767Z"/></svg>
```

### React

```tsx
// Gentleface "octagon" (line-round), MIT. https://gentleface.com/icons/octagon
import type { SVGProps } from 'react';

export function OctagonIcon(props: SVGProps<SVGSVGElement>) {
  return (
    <svg xmlns="http://www.w3.org/2000/svg" width={16} height={16} viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" {...props}>
      <path d="M13.778 5.385C13.926 5.742 14 6.114 14 6.5L14 9.5C14 9.886 13.926 10.258 13.778 10.615C13.63 10.972 13.42 11.287 13.146 11.561L11.561 13.146C11.287 13.42 10.972 13.63 10.615 13.778C10.258 13.926 9.886 14 9.5 14L6.5 14C6.114 14 5.742 13.926 5.385 13.778C5.028 13.63 4.713 13.42 4.439 13.146L2.854 11.561C2.58 11.287 2.37 10.972 2.222 10.615C2.074 10.258 2 9.886 2 9.5L2 6.5C2 6.114 2.074 5.742 2.222 5.385C2.37 5.028 2.58 4.713 2.854 4.439L4.439 2.854C4.713 2.58 5.028 2.37 5.385 2.222C5.742 2.074 6.114 2 6.5 2L9.5 2C9.886 2 10.258 2.074 10.615 2.222C10.972 2.37 11.287 2.58 11.561 2.854L13.146 4.439C13.42 4.713 13.63 5.028 13.778 5.385ZM3.146 5.767C3.049 6.002 3 6.246 3 6.5L3 9.5C3 9.754 3.049 9.998 3.146 10.233C3.243 10.467 3.381 10.674 3.561 10.854L5.146 12.439C5.326 12.619 5.533 12.757 5.767 12.854C6.002 12.951 6.246 13 6.5 13L9.5 13C9.754 13 9.998 12.951 10.233 12.854C10.467 12.757 10.674 12.619 10.854 12.439L12.439 10.854C12.619 10.674 12.757 10.467 12.854 10.233C12.951 9.998 13 9.754 13 9.5L13 6.5C13 6.246 12.951 6.002 12.854 5.767C12.757 5.533 12.619 5.326 12.439 5.146L10.854 3.561C10.674 3.381 10.467 3.243 10.233 3.146C9.998 3.049 9.754 3 9.5 3L6.5 3C6.246 3 6.002 3.049 5.767 3.146C5.533 3.243 5.326 3.381 5.146 3.561L3.561 5.146C3.381 5.326 3.243 5.533 3.146 5.767Z" />
    </svg>
  );
}
```

### Vue

```vue
<!-- Gentleface "octagon" (line-round), MIT. https://gentleface.com/icons/octagon -->
<template>
  <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true">
    <path d="M13.778 5.385C13.926 5.742 14 6.114 14 6.5L14 9.5C14 9.886 13.926 10.258 13.778 10.615C13.63 10.972 13.42 11.287 13.146 11.561L11.561 13.146C11.287 13.42 10.972 13.63 10.615 13.778C10.258 13.926 9.886 14 9.5 14L6.5 14C6.114 14 5.742 13.926 5.385 13.778C5.028 13.63 4.713 13.42 4.439 13.146L2.854 11.561C2.58 11.287 2.37 10.972 2.222 10.615C2.074 10.258 2 9.886 2 9.5L2 6.5C2 6.114 2.074 5.742 2.222 5.385C2.37 5.028 2.58 4.713 2.854 4.439L4.439 2.854C4.713 2.58 5.028 2.37 5.385 2.222C5.742 2.074 6.114 2 6.5 2L9.5 2C9.886 2 10.258 2.074 10.615 2.222C10.972 2.37 11.287 2.58 11.561 2.854L13.146 4.439C13.42 4.713 13.63 5.028 13.778 5.385ZM3.146 5.767C3.049 6.002 3 6.246 3 6.5L3 9.5C3 9.754 3.049 9.998 3.146 10.233C3.243 10.467 3.381 10.674 3.561 10.854L5.146 12.439C5.326 12.619 5.533 12.757 5.767 12.854C6.002 12.951 6.246 13 6.5 13L9.5 13C9.754 13 9.998 12.951 10.233 12.854C10.467 12.757 10.674 12.619 10.854 12.439L12.439 10.854C12.619 10.674 12.757 10.467 12.854 10.233C12.951 9.998 13 9.754 13 9.5L13 6.5C13 6.246 12.951 6.002 12.854 5.767C12.757 5.533 12.619 5.326 12.439 5.146L10.854 3.561C10.674 3.381 10.467 3.243 10.233 3.146C9.998 3.049 9.754 3 9.5 3L6.5 3C6.246 3 6.002 3.049 5.767 3.146C5.533 3.243 5.326 3.381 5.146 3.561L3.561 5.146C3.381 5.326 3.243 5.533 3.146 5.767Z" />
  </svg>
</template>
```

### Svelte

```svelte
<!-- Gentleface "octagon" (line-round), MIT. https://gentleface.com/icons/octagon -->
<script>
  let props = $props();
</script>

<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" {...props}>
  <path d="M13.778 5.385C13.926 5.742 14 6.114 14 6.5L14 9.5C14 9.886 13.926 10.258 13.778 10.615C13.63 10.972 13.42 11.287 13.146 11.561L11.561 13.146C11.287 13.42 10.972 13.63 10.615 13.778C10.258 13.926 9.886 14 9.5 14L6.5 14C6.114 14 5.742 13.926 5.385 13.778C5.028 13.63 4.713 13.42 4.439 13.146L2.854 11.561C2.58 11.287 2.37 10.972 2.222 10.615C2.074 10.258 2 9.886 2 9.5L2 6.5C2 6.114 2.074 5.742 2.222 5.385C2.37 5.028 2.58 4.713 2.854 4.439L4.439 2.854C4.713 2.58 5.028 2.37 5.385 2.222C5.742 2.074 6.114 2 6.5 2L9.5 2C9.886 2 10.258 2.074 10.615 2.222C10.972 2.37 11.287 2.58 11.561 2.854L13.146 4.439C13.42 4.713 13.63 5.028 13.778 5.385ZM3.146 5.767C3.049 6.002 3 6.246 3 6.5L3 9.5C3 9.754 3.049 9.998 3.146 10.233C3.243 10.467 3.381 10.674 3.561 10.854L5.146 12.439C5.326 12.619 5.533 12.757 5.767 12.854C6.002 12.951 6.246 13 6.5 13L9.5 13C9.754 13 9.998 12.951 10.233 12.854C10.467 12.757 10.674 12.619 10.854 12.439L12.439 10.854C12.619 10.674 12.757 10.467 12.854 10.233C12.951 9.998 13 9.754 13 9.5L13 6.5C13 6.246 12.951 6.002 12.854 5.767C12.757 5.533 12.619 5.326 12.439 5.146L10.854 3.561C10.674 3.381 10.467 3.243 10.233 3.146C9.998 3.049 9.754 3 9.5 3L6.5 3C6.246 3 6.002 3.049 5.767 3.146C5.533 3.243 5.326 3.381 5.146 3.561L3.561 5.146C3.381 5.326 3.243 5.533 3.146 5.767Z" />
</svg>
```

### HTML img

```html
<!-- Gentleface "octagon" (line-round), MIT. https://gentleface.com/icons/octagon. An <img> can't take currentColor: it draws black. Inline the SVG or use the CSS mask to color it. -->
<img src="https://gentleface.com/svg/line-round/16/octagon.svg" width="16" height="16" alt="">
```

### CSS

```css
/* Gentleface "octagon" (line-round), MIT. https://gentleface.com/icons/octagon. Takes the text color. */
.icon-octagon {
  display: inline-block;
  width: 16px;
  height: 16px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath d='M13.778 5.385C13.926 5.742 14 6.114 14 6.5L14 9.5C14 9.886 13.926 10.258 13.778 10.615C13.63 10.972 13.42 11.287 13.146 11.561L11.561 13.146C11.287 13.42 10.972 13.63 10.615 13.778C10.258 13.926 9.886 14 9.5 14L6.5 14C6.114 14 5.742 13.926 5.385 13.778C5.028 13.63 4.713 13.42 4.439 13.146L2.854 11.561C2.58 11.287 2.37 10.972 2.222 10.615C2.074 10.258 2 9.886 2 9.5L2 6.5C2 6.114 2.074 5.742 2.222 5.385C2.37 5.028 2.58 4.713 2.854 4.439L4.439 2.854C4.713 2.58 5.028 2.37 5.385 2.222C5.742 2.074 6.114 2 6.5 2L9.5 2C9.886 2 10.258 2.074 10.615 2.222C10.972 2.37 11.287 2.58 11.561 2.854L13.146 4.439C13.42 4.713 13.63 5.028 13.778 5.385ZM3.146 5.767C3.049 6.002 3 6.246 3 6.5L3 9.5C3 9.754 3.049 9.998 3.146 10.233C3.243 10.467 3.381 10.674 3.561 10.854L5.146 12.439C5.326 12.619 5.533 12.757 5.767 12.854C6.002 12.951 6.246 13 6.5 13L9.5 13C9.754 13 9.998 12.951 10.233 12.854C10.467 12.757 10.674 12.619 10.854 12.439L12.439 10.854C12.619 10.674 12.757 10.467 12.854 10.233C12.951 9.998 13 9.754 13 9.5L13 6.5C13 6.246 12.951 6.002 12.854 5.767C12.757 5.533 12.619 5.326 12.439 5.146L10.854 3.561C10.674 3.381 10.467 3.243 10.233 3.146C9.998 3.049 9.754 3 9.5 3L6.5 3C6.246 3 6.002 3.049 5.767 3.146C5.533 3.243 5.326 3.381 5.146 3.561L3.561 5.146C3.381 5.326 3.243 5.533 3.146 5.767Z'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath d='M13.778 5.385C13.926 5.742 14 6.114 14 6.5L14 9.5C14 9.886 13.926 10.258 13.778 10.615C13.63 10.972 13.42 11.287 13.146 11.561L11.561 13.146C11.287 13.42 10.972 13.63 10.615 13.778C10.258 13.926 9.886 14 9.5 14L6.5 14C6.114 14 5.742 13.926 5.385 13.778C5.028 13.63 4.713 13.42 4.439 13.146L2.854 11.561C2.58 11.287 2.37 10.972 2.222 10.615C2.074 10.258 2 9.886 2 9.5L2 6.5C2 6.114 2.074 5.742 2.222 5.385C2.37 5.028 2.58 4.713 2.854 4.439L4.439 2.854C4.713 2.58 5.028 2.37 5.385 2.222C5.742 2.074 6.114 2 6.5 2L9.5 2C9.886 2 10.258 2.074 10.615 2.222C10.972 2.37 11.287 2.58 11.561 2.854L13.146 4.439C13.42 4.713 13.63 5.028 13.778 5.385ZM3.146 5.767C3.049 6.002 3 6.246 3 6.5L3 9.5C3 9.754 3.049 9.998 3.146 10.233C3.243 10.467 3.381 10.674 3.561 10.854L5.146 12.439C5.326 12.619 5.533 12.757 5.767 12.854C6.002 12.951 6.246 13 6.5 13L9.5 13C9.754 13 9.998 12.951 10.233 12.854C10.467 12.757 10.674 12.619 10.854 12.439L12.439 10.854C12.619 10.674 12.757 10.467 12.854 10.233C12.951 9.998 13 9.754 13 9.5L13 6.5C13 6.246 12.951 6.002 12.854 5.767C12.757 5.533 12.619 5.326 12.439 5.146L10.854 3.561C10.674 3.381 10.467 3.243 10.233 3.146C9.998 3.049 9.754 3 9.5 3L6.5 3C6.246 3 6.002 3.049 5.767 3.146C5.533 3.243 5.326 3.381 5.146 3.561L3.561 5.146C3.381 5.326 3.243 5.533 3.146 5.767Z'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
}
```

### Data URL

```text
data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath d='M13.778 5.385C13.926 5.742 14 6.114 14 6.5L14 9.5C14 9.886 13.926 10.258 13.778 10.615C13.63 10.972 13.42 11.287 13.146 11.561L11.561 13.146C11.287 13.42 10.972 13.63 10.615 13.778C10.258 13.926 9.886 14 9.5 14L6.5 14C6.114 14 5.742 13.926 5.385 13.778C5.028 13.63 4.713 13.42 4.439 13.146L2.854 11.561C2.58 11.287 2.37 10.972 2.222 10.615C2.074 10.258 2 9.886 2 9.5L2 6.5C2 6.114 2.074 5.742 2.222 5.385C2.37 5.028 2.58 4.713 2.854 4.439L4.439 2.854C4.713 2.58 5.028 2.37 5.385 2.222C5.742 2.074 6.114 2 6.5 2L9.5 2C9.886 2 10.258 2.074 10.615 2.222C10.972 2.37 11.287 2.58 11.561 2.854L13.146 4.439C13.42 4.713 13.63 5.028 13.778 5.385ZM3.146 5.767C3.049 6.002 3 6.246 3 6.5L3 9.5C3 9.754 3.049 9.998 3.146 10.233C3.243 10.467 3.381 10.674 3.561 10.854L5.146 12.439C5.326 12.619 5.533 12.757 5.767 12.854C6.002 12.951 6.246 13 6.5 13L9.5 13C9.754 13 9.998 12.951 10.233 12.854C10.467 12.757 10.674 12.619 10.854 12.439L12.439 10.854C12.619 10.674 12.757 10.467 12.854 10.233C12.951 9.998 13 9.754 13 9.5L13 6.5C13 6.246 12.951 6.002 12.854 5.767C12.757 5.533 12.619 5.326 12.439 5.146L10.854 3.561C10.674 3.381 10.467 3.243 10.233 3.146C9.998 3.049 9.754 3 9.5 3L6.5 3C6.246 3 6.002 3.049 5.767 3.146C5.533 3.243 5.326 3.381 5.146 3.561L3.561 5.146C3.381 5.326 3.243 5.533 3.146 5.767Z'/%3E%3C/svg%3E
```

### Sprite

```html
<!-- Gentleface "octagon" (line-round), MIT. https://gentleface.com/icons/octagon
     Every icon of this style in one file: https://gentleface.com/sprite/line-round.svg
     Serve it from your own origin: <use> does not load from another origin. -->
<svg width="16" height="16" aria-hidden="true"><use href="/sprite/line-round.svg#octagon"/></svg>
```

### SwiftUI

```swift
// Gentleface "octagon" (line-round), MIT. https://gentleface.com/icons/octagon
import SwiftUI

struct OctagonIcon: Shape {
    func path(in rect: CGRect) -> Path {
        var p = Path()
        p.move(to: CGPoint(x: 13.778, y: 5.385))
        p.addCurve(to: CGPoint(x: 14, y: 6.5), control1: CGPoint(x: 13.926, y: 5.742), control2: CGPoint(x: 14, y: 6.114))
        p.addLine(to: CGPoint(x: 14, y: 9.5))
        p.addCurve(to: CGPoint(x: 13.778, y: 10.615), control1: CGPoint(x: 14, y: 9.886), control2: CGPoint(x: 13.926, y: 10.258))
        p.addCurve(to: CGPoint(x: 13.146, y: 11.561), control1: CGPoint(x: 13.63, y: 10.972), control2: CGPoint(x: 13.42, y: 11.287))
        p.addLine(to: CGPoint(x: 11.561, y: 13.146))
        p.addCurve(to: CGPoint(x: 10.615, y: 13.778), control1: CGPoint(x: 11.287, y: 13.42), control2: CGPoint(x: 10.972, y: 13.63))
        p.addCurve(to: CGPoint(x: 9.5, y: 14), control1: CGPoint(x: 10.258, y: 13.926), control2: CGPoint(x: 9.886, y: 14))
        p.addLine(to: CGPoint(x: 6.5, y: 14))
        p.addCurve(to: CGPoint(x: 5.385, y: 13.778), control1: CGPoint(x: 6.114, y: 14), control2: CGPoint(x: 5.742, y: 13.926))
        p.addCurve(to: CGPoint(x: 4.439, y: 13.146), control1: CGPoint(x: 5.028, y: 13.63), control2: CGPoint(x: 4.713, y: 13.42))
        p.addLine(to: CGPoint(x: 2.854, y: 11.561))
        p.addCurve(to: CGPoint(x: 2.222, y: 10.615), control1: CGPoint(x: 2.58, y: 11.287), control2: CGPoint(x: 2.37, y: 10.972))
        p.addCurve(to: CGPoint(x: 2, y: 9.5), control1: CGPoint(x: 2.074, y: 10.258), control2: CGPoint(x: 2, y: 9.886))
        p.addLine(to: CGPoint(x: 2, y: 6.5))
        p.addCurve(to: CGPoint(x: 2.222, y: 5.385), control1: CGPoint(x: 2, y: 6.114), control2: CGPoint(x: 2.074, y: 5.742))
        p.addCurve(to: CGPoint(x: 2.854, y: 4.439), control1: CGPoint(x: 2.37, y: 5.028), control2: CGPoint(x: 2.58, y: 4.713))
        p.addLine(to: CGPoint(x: 4.439, y: 2.854))
        p.addCurve(to: CGPoint(x: 5.385, y: 2.222), control1: CGPoint(x: 4.713, y: 2.58), control2: CGPoint(x: 5.028, y: 2.37))
        p.addCurve(to: CGPoint(x: 6.5, y: 2), control1: CGPoint(x: 5.742, y: 2.074), control2: CGPoint(x: 6.114, y: 2))
        p.addLine(to: CGPoint(x: 9.5, y: 2))
        p.addCurve(to: CGPoint(x: 10.615, y: 2.222), control1: CGPoint(x: 9.886, y: 2), control2: CGPoint(x: 10.258, y: 2.074))
        p.addCurve(to: CGPoint(x: 11.561, y: 2.854), control1: CGPoint(x: 10.972, y: 2.37), control2: CGPoint(x: 11.287, y: 2.58))
        p.addLine(to: CGPoint(x: 13.146, y: 4.439))
        p.addCurve(to: CGPoint(x: 13.778, y: 5.385), control1: CGPoint(x: 13.42, y: 4.713), control2: CGPoint(x: 13.63, y: 5.028))
        p.closeSubpath()
        p.move(to: CGPoint(x: 3.146, y: 5.767))
        p.addCurve(to: CGPoint(x: 3, y: 6.5), control1: CGPoint(x: 3.049, y: 6.002), control2: CGPoint(x: 3, y: 6.246))
        p.addLine(to: CGPoint(x: 3, y: 9.5))
        p.addCurve(to: CGPoint(x: 3.146, y: 10.233), control1: CGPoint(x: 3, y: 9.754), control2: CGPoint(x: 3.049, y: 9.998))
        p.addCurve(to: CGPoint(x: 3.561, y: 10.854), control1: CGPoint(x: 3.243, y: 10.467), control2: CGPoint(x: 3.381, y: 10.674))
        p.addLine(to: CGPoint(x: 5.146, y: 12.439))
        p.addCurve(to: CGPoint(x: 5.767, y: 12.854), control1: CGPoint(x: 5.326, y: 12.619), control2: CGPoint(x: 5.533, y: 12.757))
        p.addCurve(to: CGPoint(x: 6.5, y: 13), control1: CGPoint(x: 6.002, y: 12.951), control2: CGPoint(x: 6.246, y: 13))
        p.addLine(to: CGPoint(x: 9.5, y: 13))
        p.addCurve(to: CGPoint(x: 10.233, y: 12.854), control1: CGPoint(x: 9.754, y: 13), control2: CGPoint(x: 9.998, y: 12.951))
        p.addCurve(to: CGPoint(x: 10.854, y: 12.439), control1: CGPoint(x: 10.467, y: 12.757), control2: CGPoint(x: 10.674, y: 12.619))
        p.addLine(to: CGPoint(x: 12.439, y: 10.854))
        p.addCurve(to: CGPoint(x: 12.854, y: 10.233), control1: CGPoint(x: 12.619, y: 10.674), control2: CGPoint(x: 12.757, y: 10.467))
        p.addCurve(to: CGPoint(x: 13, y: 9.5), control1: CGPoint(x: 12.951, y: 9.998), control2: CGPoint(x: 13, y: 9.754))
        p.addLine(to: CGPoint(x: 13, y: 6.5))
        p.addCurve(to: CGPoint(x: 12.854, y: 5.767), control1: CGPoint(x: 13, y: 6.246), control2: CGPoint(x: 12.951, y: 6.002))
        p.addCurve(to: CGPoint(x: 12.439, y: 5.146), control1: CGPoint(x: 12.757, y: 5.533), control2: CGPoint(x: 12.619, y: 5.326))
        p.addLine(to: CGPoint(x: 10.854, y: 3.561))
        p.addCurve(to: CGPoint(x: 10.233, y: 3.146), control1: CGPoint(x: 10.674, y: 3.381), control2: CGPoint(x: 10.467, y: 3.243))
        p.addCurve(to: CGPoint(x: 9.5, y: 3), control1: CGPoint(x: 9.998, y: 3.049), control2: CGPoint(x: 9.754, y: 3))
        p.addLine(to: CGPoint(x: 6.5, y: 3))
        p.addCurve(to: CGPoint(x: 5.767, y: 3.146), control1: CGPoint(x: 6.246, y: 3), control2: CGPoint(x: 6.002, y: 3.049))
        p.addCurve(to: CGPoint(x: 5.146, y: 3.561), control1: CGPoint(x: 5.533, y: 3.243), control2: CGPoint(x: 5.326, y: 3.381))
        p.addLine(to: CGPoint(x: 3.561, y: 5.146))
        p.addCurve(to: CGPoint(x: 3.146, y: 5.767), control1: CGPoint(x: 3.381, y: 5.326), control2: CGPoint(x: 3.243, y: 5.533))
        p.closeSubpath()
        return p.applying(CGAffineTransform(scaleX: rect.width / 16, y: rect.height / 16))
    }
}

// OctagonIcon().frame(width: 16, height: 16) fills with the foreground style. Keep it on whole points to stay crisp.
```

### Compose

```kotlin
// Gentleface "octagon" (line-round), MIT. https://gentleface.com/icons/octagon
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.addPathNodes
import androidx.compose.ui.unit.dp

val OctagonIcon: ImageVector by lazy {
    ImageVector.Builder(
        name = "octagon", defaultWidth = 16.dp, defaultHeight = 16.dp,
        viewportWidth = 16f, viewportHeight = 16f,
    ).addPath(
        pathData = addPathNodes("M13.778 5.385C13.926 5.742 14 6.114 14 6.5L14 9.5C14 9.886 13.926 10.258 13.778 10.615C13.63 10.972 13.42 11.287 13.146 11.561L11.561 13.146C11.287 13.42 10.972 13.63 10.615 13.778C10.258 13.926 9.886 14 9.5 14L6.5 14C6.114 14 5.742 13.926 5.385 13.778C5.028 13.63 4.713 13.42 4.439 13.146L2.854 11.561C2.58 11.287 2.37 10.972 2.222 10.615C2.074 10.258 2 9.886 2 9.5L2 6.5C2 6.114 2.074 5.742 2.222 5.385C2.37 5.028 2.58 4.713 2.854 4.439L4.439 2.854C4.713 2.58 5.028 2.37 5.385 2.222C5.742 2.074 6.114 2 6.5 2L9.5 2C9.886 2 10.258 2.074 10.615 2.222C10.972 2.37 11.287 2.58 11.561 2.854L13.146 4.439C13.42 4.713 13.63 5.028 13.778 5.385ZM3.146 5.767C3.049 6.002 3 6.246 3 6.5L3 9.5C3 9.754 3.049 9.998 3.146 10.233C3.243 10.467 3.381 10.674 3.561 10.854L5.146 12.439C5.326 12.619 5.533 12.757 5.767 12.854C6.002 12.951 6.246 13 6.5 13L9.5 13C9.754 13 9.998 12.951 10.233 12.854C10.467 12.757 10.674 12.619 10.854 12.439L12.439 10.854C12.619 10.674 12.757 10.467 12.854 10.233C12.951 9.998 13 9.754 13 9.5L13 6.5C13 6.246 12.951 6.002 12.854 5.767C12.757 5.533 12.619 5.326 12.439 5.146L10.854 3.561C10.674 3.381 10.467 3.243 10.233 3.146C9.998 3.049 9.754 3 9.5 3L6.5 3C6.246 3 6.002 3.049 5.767 3.146C5.533 3.243 5.326 3.381 5.146 3.561L3.561 5.146C3.381 5.326 3.243 5.533 3.146 5.767Z"),
        fill = SolidColor(Color.Black),
    ).build()
}

// Icon(OctagonIcon, contentDescription = null) tints it with LocalContentColor.
```

### Android XML

```xml
<!-- res/drawable/ic_octagon.xml · Gentleface "octagon" (line-round), MIT. https://gentleface.com/icons/octagon -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="16dp"
    android:height="16dp"
    android:viewportWidth="16"
    android:viewportHeight="16"
    android:tint="?attr/colorControlNormal">
  <path
      android:fillColor="@android:color/white"
      android:pathData="M13.778 5.385C13.926 5.742 14 6.114 14 6.5L14 9.5C14 9.886 13.926 10.258 13.778 10.615C13.63 10.972 13.42 11.287 13.146 11.561L11.561 13.146C11.287 13.42 10.972 13.63 10.615 13.778C10.258 13.926 9.886 14 9.5 14L6.5 14C6.114 14 5.742 13.926 5.385 13.778C5.028 13.63 4.713 13.42 4.439 13.146L2.854 11.561C2.58 11.287 2.37 10.972 2.222 10.615C2.074 10.258 2 9.886 2 9.5L2 6.5C2 6.114 2.074 5.742 2.222 5.385C2.37 5.028 2.58 4.713 2.854 4.439L4.439 2.854C4.713 2.58 5.028 2.37 5.385 2.222C5.742 2.074 6.114 2 6.5 2L9.5 2C9.886 2 10.258 2.074 10.615 2.222C10.972 2.37 11.287 2.58 11.561 2.854L13.146 4.439C13.42 4.713 13.63 5.028 13.778 5.385ZM3.146 5.767C3.049 6.002 3 6.246 3 6.5L3 9.5C3 9.754 3.049 9.998 3.146 10.233C3.243 10.467 3.381 10.674 3.561 10.854L5.146 12.439C5.326 12.619 5.533 12.757 5.767 12.854C6.002 12.951 6.246 13 6.5 13L9.5 13C9.754 13 9.998 12.951 10.233 12.854C10.467 12.757 10.674 12.619 10.854 12.439L12.439 10.854C12.619 10.674 12.757 10.467 12.854 10.233C12.951 9.998 13 9.754 13 9.5L13 6.5C13 6.246 12.951 6.002 12.854 5.767C12.757 5.533 12.619 5.326 12.439 5.146L10.854 3.561C10.674 3.381 10.467 3.243 10.233 3.146C9.998 3.049 9.754 3 9.5 3L6.5 3C6.246 3 6.002 3.049 5.767 3.146C5.533 3.243 5.326 3.381 5.146 3.561L3.561 5.146C3.381 5.326 3.243 5.533 3.146 5.767Z"/>
</vector>
```

### Flutter

```dart
// Gentleface "octagon" (line-round), MIT. https://gentleface.com/icons/octagon
import 'package:flutter/widgets.dart';

class OctagonIcon extends StatelessWidget {
  const OctagonIcon({super.key, this.size = 16, this.color});
  final double size;
  final Color? color;

  @override
  Widget build(BuildContext context) => CustomPaint(
        size: Size.square(size),
        painter: _OctagonIconPainter(color ?? IconTheme.of(context).color ?? const Color(0xFF000000)),
      );
}

class _OctagonIconPainter extends CustomPainter {
  _OctagonIconPainter(this.color);
  final Color color;

  @override
  void paint(Canvas canvas, Size size) {
    canvas.scale(size.width / 16, size.height / 16);
    final p = Path()
      ..moveTo(13.778, 5.385)
      ..cubicTo(13.926, 5.742, 14, 6.114, 14, 6.5)
      ..lineTo(14, 9.5)
      ..cubicTo(14, 9.886, 13.926, 10.258, 13.778, 10.615)
      ..cubicTo(13.63, 10.972, 13.42, 11.287, 13.146, 11.561)
      ..lineTo(11.561, 13.146)
      ..cubicTo(11.287, 13.42, 10.972, 13.63, 10.615, 13.778)
      ..cubicTo(10.258, 13.926, 9.886, 14, 9.5, 14)
      ..lineTo(6.5, 14)
      ..cubicTo(6.114, 14, 5.742, 13.926, 5.385, 13.778)
      ..cubicTo(5.028, 13.63, 4.713, 13.42, 4.439, 13.146)
      ..lineTo(2.854, 11.561)
      ..cubicTo(2.58, 11.287, 2.37, 10.972, 2.222, 10.615)
      ..cubicTo(2.074, 10.258, 2, 9.886, 2, 9.5)
      ..lineTo(2, 6.5)
      ..cubicTo(2, 6.114, 2.074, 5.742, 2.222, 5.385)
      ..cubicTo(2.37, 5.028, 2.58, 4.713, 2.854, 4.439)
      ..lineTo(4.439, 2.854)
      ..cubicTo(4.713, 2.58, 5.028, 2.37, 5.385, 2.222)
      ..cubicTo(5.742, 2.074, 6.114, 2, 6.5, 2)
      ..lineTo(9.5, 2)
      ..cubicTo(9.886, 2, 10.258, 2.074, 10.615, 2.222)
      ..cubicTo(10.972, 2.37, 11.287, 2.58, 11.561, 2.854)
      ..lineTo(13.146, 4.439)
      ..cubicTo(13.42, 4.713, 13.63, 5.028, 13.778, 5.385)
      ..close()
      ..moveTo(3.146, 5.767)
      ..cubicTo(3.049, 6.002, 3, 6.246, 3, 6.5)
      ..lineTo(3, 9.5)
      ..cubicTo(3, 9.754, 3.049, 9.998, 3.146, 10.233)
      ..cubicTo(3.243, 10.467, 3.381, 10.674, 3.561, 10.854)
      ..lineTo(5.146, 12.439)
      ..cubicTo(5.326, 12.619, 5.533, 12.757, 5.767, 12.854)
      ..cubicTo(6.002, 12.951, 6.246, 13, 6.5, 13)
      ..lineTo(9.5, 13)
      ..cubicTo(9.754, 13, 9.998, 12.951, 10.233, 12.854)
      ..cubicTo(10.467, 12.757, 10.674, 12.619, 10.854, 12.439)
      ..lineTo(12.439, 10.854)
      ..cubicTo(12.619, 10.674, 12.757, 10.467, 12.854, 10.233)
      ..cubicTo(12.951, 9.998, 13, 9.754, 13, 9.5)
      ..lineTo(13, 6.5)
      ..cubicTo(13, 6.246, 12.951, 6.002, 12.854, 5.767)
      ..cubicTo(12.757, 5.533, 12.619, 5.326, 12.439, 5.146)
      ..lineTo(10.854, 3.561)
      ..cubicTo(10.674, 3.381, 10.467, 3.243, 10.233, 3.146)
      ..cubicTo(9.998, 3.049, 9.754, 3, 9.5, 3)
      ..lineTo(6.5, 3)
      ..cubicTo(6.246, 3, 6.002, 3.049, 5.767, 3.146)
      ..cubicTo(5.533, 3.243, 5.326, 3.381, 5.146, 3.561)
      ..lineTo(3.561, 5.146)
      ..cubicTo(3.381, 5.326, 3.243, 5.533, 3.146, 5.767)
      ..close();
    canvas.drawPath(p, Paint()..color = color);
  }

  @override
  bool shouldRepaint(_OctagonIconPainter old) => old.color != color;
}
```
