# panel macro in Confluence storage format

URL: https://goingstellar.ro/reference/confluence-storage-format/panel-macro/

The panel macro wraps rich text in a box with a configurable border, background and optional title row. It is the macro the Cloud editor's panel element replaces. Of the colour and border parameters tested, only the background colour survives a round trip through ADF.

## Storage format

```xml
<ac:structured-macro ac:name="panel"><ac:parameter ac:name="title">My Title</ac:parameter><ac:parameter ac:name="borderStyle">dashed</ac:parameter><ac:parameter ac:name="borderColor">#ccc</ac:parameter><ac:parameter ac:name="titleBGColor">#F7D6C1</ac:parameter><ac:parameter ac:name="bgColor">#FFFFCE</ac:parameter><ac:rich-text-body><p>a <strong>panel</strong></p></ac:rich-text-body></ac:structured-macro>
```

## In the editor

- Use the panel element instead. Per the Atlassian documentation. The macro page says new instances of the Panel macro cannot be inserted in the Cloud editor.

## As ADF (Confluence Cloud)

The ADF that Confluence Cloud builds for:

```xml
<ac:structured-macro ac:name="panel"><ac:parameter ac:name="bgColor">#deebff</ac:parameter><ac:rich-text-body><p>blue</p></ac:rich-text-body></ac:structured-macro>
```

```json
{
 "type": "doc",
 "content": [
  {
   "type": "panel",
   "attrs": {
    "panelColor": "#deebff",
    "panelType": "custom"
   },
   "content": [
    {
     "type": "paragraph",
     "content": [
      {
       "text": "blue",
       "type": "text"
      }
     ]
    }
   ]
  }
 ],
 "version": 1
}
```

## Examples

Storage format sent:

```xml
<ac:structured-macro ac:name="panel"><ac:parameter ac:name="title">My Title</ac:parameter><ac:parameter ac:name="borderStyle">dashed</ac:parameter><ac:parameter ac:name="borderColor">#ccc</ac:parameter><ac:parameter ac:name="titleBGColor">#F7D6C1</ac:parameter><ac:parameter ac:name="bgColor">#FFFFCE</ac:parameter><ac:rich-text-body><p>a <strong>panel</strong></p></ac:rich-text-body></ac:structured-macro>
```

Build a panel with a title row, a dashed border and two colours. All five parameters render on the stored page.

Rendered view (HTML):

```html
<div class="panel conf-macro output-block" data-hasbody="true" data-macro-id="<id>" data-macro-name="panel" style="background-color: #FFFFCE;border-color: #ccc;border-style: dashed;border-width: 1px;"><div class="panelHeader" style="border-bottom-width: 1px;border-bottom-style: dashed;border-bottom-color: #ccc;background-color: #F7D6C1;"><b>My Title</b></div><div class="panelContent" style="background-color: #FFFFCE;">
<p>a <strong>panel</strong></p>
</div></div>
```

Storage format after the round trip through ADF:

```xml
<ac:structured-macro ac:name="panel" ac:schema-version="1" ac:macro-id="<id>"><ac:parameter ac:name="containerLevel">panel_c1</ac:parameter><ac:parameter ac:name="bgColor">#FFFFCE</ac:parameter><ac:rich-text-body><p><strong>My Title</strong></p><p>a <strong>panel</strong></p></ac:rich-text-body></ac:structured-macro>
```

Sent to Confluence Cloud on 29 Nov 2026.

Storage format sent:

```xml
<ac:structured-macro ac:name="panel"><ac:parameter ac:name="bgColor">#deebff</ac:parameter><ac:rich-text-body><p>blue</p></ac:rich-text-body></ac:structured-macro>
```

Tint a block with a pale blue background and nothing else.

Rendered view (HTML):

```html
<div class="panel conf-macro output-block" data-hasbody="true" data-macro-id="<id>" data-macro-name="panel" style="background-color: #deebff;border-width: 1px;"><div class="panelContent" style="background-color: #deebff;">
<p>blue</p>
</div></div>
```

Storage format after the round trip through ADF:

```xml
<ac:structured-macro ac:name="panel" ac:schema-version="1" ac:macro-id="<id>"><ac:parameter ac:name="containerLevel">panel_c1</ac:parameter><ac:parameter ac:name="bgColor">#deebff</ac:parameter><ac:rich-text-body><p>blue</p></ac:rich-text-body></ac:structured-macro>
```

Sent to Confluence Cloud on 29 Nov 2026.

Storage format sent:

```xml
<ac:structured-macro ac:name="panel"><ac:parameter ac:name="bgColor">#ff0000</ac:parameter><ac:rich-text-body><p>custom red</p></ac:rich-text-body></ac:structured-macro>
```

Use any hex colour for the background. A hex value outside the named colours is accepted.

Rendered view (HTML):

```html
<div class="panel conf-macro output-block" data-hasbody="true" data-macro-id="<id>" data-macro-name="panel" style="background-color: #ff0000;border-width: 1px;"><div class="panelContent" style="background-color: #ff0000;">
<p>custom red</p>
</div></div>
```

Storage format after the round trip through ADF:

```xml
<ac:structured-macro ac:name="panel" ac:schema-version="1" ac:macro-id="<id>"><ac:parameter ac:name="containerLevel">panel_c1</ac:parameter><ac:parameter ac:name="bgColor">#ff0000</ac:parameter><ac:rich-text-body><p>custom red</p></ac:rich-text-body></ac:structured-macro>
```

Sent to Confluence Cloud on 29 Nov 2026.

Storage format sent:

```xml
<ac:structured-macro ac:name="panel"><ac:rich-text-body><p>default panel</p></ac:rich-text-body></ac:structured-macro>
```

Insert a panel with no parameters, which draws a plain bordered box.

Rendered view (HTML):

```html
<div class="panel conf-macro output-block" data-hasbody="true" data-macro-id="<id>" data-macro-name="panel" style="border-width: 1px;"><div class="panelContent">
<p>default panel</p>
</div></div>
```

Storage format after the round trip through ADF:

```xml
<ac:structured-macro ac:name="panel" ac:schema-version="1" ac:macro-id="<id>"><ac:parameter ac:name="containerLevel">panel_c1</ac:parameter><ac:rich-text-body><p>default panel</p></ac:rich-text-body></ac:structured-macro>
```

Sent to Confluence Cloud on 29 Nov 2026.

Storage format sent:

```xml
ADF:{"content": [{"attrs": {"panelColor": "#eae6ff", "panelIcon": ":rocket:", "panelIconText": "🚀", "panelType": "custom"}, "content": [{"content": [{"text": "custom panel", "type": "text"}], "type": "paragraph"}], "type": "panel"}], "type": "doc", "version": 1}
```

Save an ADF custom panel with an emoji icon and a colour. The icon is stored as two extra parameters.

Rendered view (HTML):

```html
<div class="panel conf-macro output-block" data-hasbody="true" data-macro-id="<id>" data-macro-name="panel" style="background-color: #eae6ff;border-width: 1px;"><div class="panelContent" style="background-color: #eae6ff;">
<p>custom panel</p>
</div></div>
```

Storage format after the round trip through ADF:

```xml
<ac:structured-macro ac:name="panel" ac:schema-version="1" ac:macro-id="<id>"><ac:parameter ac:name="containerLevel">panel_c1</ac:parameter><ac:parameter ac:name="panelIcon">:rocket:</ac:parameter><ac:parameter ac:name="panelIconText">🚀</ac:parameter><ac:parameter ac:name="bgColor">#eae6ff</ac:parameter><ac:rich-text-body><p>custom panel</p></ac:rich-text-body></ac:structured-macro>
```

Sent to Confluence Cloud on 29 Nov 2026.

## What changes in conversion

- Of the colour and border parameters tested, only bgColor survives. It becomes panelColor on an ADF panel of type custom and returns as bgColor.
- borderStyle, borderColor and titleBGColor are lost, together with the title row. The title text moves into the body as a bold first paragraph.
- A containerLevel parameter set to panel_c1 is added to the macro when it is written back from ADF.
- An ADF custom panel with an icon is written to storage as a panel macro with panelIcon and panelIconText parameters next to bgColor.

## Where the documentation differs

Sent to Confluence Cloud, 29 Nov 2026:

```xml
<ac:structured-macro ac:name="panel"><ac:parameter ac:name="title">My Title</ac:parameter><ac:parameter ac:name="borderStyle">dashed</ac:parameter><ac:parameter ac:name="borderColor">#ccc</ac:parameter><ac:parameter ac:name="titleBGColor">#F7D6C1</ac:parameter><ac:parameter ac:name="bgColor">#FFFFCE</ac:parameter><ac:rich-text-body><p>a <strong>panel</strong></p></ac:rich-text-body></ac:structured-macro>
```

The documentation: The same page lists the panel macro among those that migrate "without any loss of data" and says Panel macros "are still visible and editable". The panel macro page documents title, borderStyle, borderColor, bgColor and titleBGColor as parameters.

The actual result: After the round trip the stored macro is <ac:structured-macro ac:name="panel" ac:schema-version="1" ac:macro-id="<id>"><ac:parameter ac:name="containerLevel">panel_c1</ac:parameter><ac:parameter ac:name="bgColor">#FFFFCE</ac:parameter><ac:rich-text-body><p><strong>My Title</strong></p><p>a <strong>panel</strong></p></ac:rich-text-body></ac:structured-macro>. borderStyle=dashed, borderColor=#ccc and titleBGColor=#F7D6C1 are gone, and the title row is now a bold paragraph in the body.

## Pitfalls

- Border and title colours exist only in storage format. Once the page is saved from the Cloud editor they cannot be recovered.
- Colours must be valid CSS values. The documentation accepts HTML colour names or hex codes, and the tested hex values were rendered as written.
- Titles are no longer a title row after conversion, so any CSS that targets the header of the panel stops matching.

## Questions and answers

### Which panel parameters does the documentation list?

title, borderStyle, borderColor, borderWidth, bgColor, titleBGColor and titleColor.

### Does bgColor survive?

Yes. It is the only colour parameter that came back after the round trip.

## Related

- [info, note, tip and warning macros](https://goingstellar.ro/reference/confluence-storage-format/info-note-tip-warning/)
- [expand macro](https://goingstellar.ro/reference/confluence-storage-format/expand/)
- [code macro](https://goingstellar.ro/reference/confluence-storage-format/code-macro/)
- [noformat macro](https://goingstellar.ro/reference/confluence-storage-format/noformat/)

## Sources

- [Insert the panel macro (Atlassian Support)](https://support.atlassian.com/confluence-cloud/docs/insert-the-panel-macro/)
- [Macros that are unavailable or have limited availability in the Cloud editor (Atlassian Support)](https://support.atlassian.com/confluence-cloud/docs/learn-which-macros-are-being-removed/)
- [Atlassian Document Format: document structure (Atlassian Developer)](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/)

