Add a background color to one cell

NathanG
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 8, 2014

How do I add a background color to one cell in my confluence table?

I'm on confluence 5.3 and I can't find any coloring options with the default editor.

Thanks~!

5 answers

1 accepted

20 votes
Answer accepted
Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 8, 2014

There is a button in the editor bar for this.

Sean Merrigan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 9, 2015

What if we want colors than those five pastels?

Like # people like this
Jacob Boyko
Contributor
April 14, 2016

Yes, more colors would be useful - and not a very difficult feature to implement I should think!

Like # people like this
s deshpande
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 26, 2016

It will be great if we can add more colors.

Like Maurice del Prado likes this
mikemusskopf
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 14, 2016

That would be better if they changed the icon as well... this looks more like a "merge" than a color icon!

Like Maurice del Prado likes this
guangyue hu
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 29, 2016

maybe also change the location, say near the text option.

Stephen Kairys
Contributor
January 25, 2017

Yeah, I'd love to have dark gray or even black. I need it to clearly indicate that this cell does not apply to this column.

Anyone know if there's an outstanding Feature request for this item?


Thanks!

 

Deleted user February 5, 2017

You can vote the following issue in order to ask to add more colors:

https://jira.atlassian.com/browse/CONF-27618 

Soren Nielsen July 19, 2018

David Studer, would be great with a button in the editor bar, but can you tell what it look like - because I do not see it..

Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 19, 2018

When you have your cursor in a table cell you should see the table toolbar appear below the regular toolbar. It's the last button.

Capture.PNG

Like # people like this
Jiří Altman
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 13, 2018

Well … that button is really useless... Whole editor is one big pain my a** - in case that we have a lot markdown languages why Atlassian reinventing wheel? Stupid step... 👎

Like # people like this
6 votes
Johannes Schneider
Contributor
May 14, 2020

are there restrictions for formatting in next-gen projects? cannot find this two lines with all the icons for formatting.

2 votes
Jonathan Smith June 22, 2017

You can always attempt to modify the table's background or cell color in the HTML in the source editor <>. 

  • Table Example: <table bgcolor="red">
  • Cell Example: <td bgcolor="blue">
  • Use "#hexcolors" instead of "blue" for best results.

Environment Server 6.6.1

Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 22, 2017

I belive if you have an older version this will not work. The code editor used to strip out anything that you put on tables, such as width or color. Looks like it works with newer version though ... yay!!

Min Lu March 8, 2018

Can I do it with a Confluence CLI one-liner?

Jonathan Smith
Contributor
March 8, 2018

Have not tried.

Susan Ostreicher
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 18, 2018

Thanks for this, Jonathan! And for anyone like me who's new to this, it looks like there's a free app that will let you edit the source:

https://marketplace.atlassian.com/apps/1210722/confluence-source-editor

Like Jonathan Smith likes this
Shaurya Chawla December 10, 2018

Jonathan Smith I tried the same way to set the color of a cell 

<td bgcolor="blue"> but when post the table data to confluence through RESTful api it results in 400 error with :

Error parsing xhtml:

Unexpected character '>'  expected '='\n at [row,col {unknown-source}]: [1,489]"}

Any help?

Jonathan Smith
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 10, 2018

@Shaurya Chawla,

  You can try a "#hex color" instead of "blue". If that does not work, I am sadly out of ideas.

Note: This still works on Confluence Server 6.6.1. Not sure if this works on Cloud.

- Jon

Shaurya Chawla December 10, 2018

ThanksJonathan Smith actually I tested below in an online html editor and it works and does change the color for text . The issue is with the confluence table storage format which accepts xhtml based(https://confluence.atlassian.com/conf612/confluence-storage-format-958777608.html#ConfluenceStorageFormat-Texteffects); hence the cause of error.

"<td> <span style = color:red>" + variableData + "</span></td>"

Steffen Heller
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 19, 2019

I do all my Confluence code formatting with Firefox Developer Tool.

If I needed a table cell with background colour, I would highlight that cell, open it in the Developer Tool panel and then change

<td class="confluenceTd">some text</td>

to

<td class="confluenceTd" style="background: red;">some text</td>
Like # people like this
rahul bhide December 15, 2020

Thanks for the link @Steffen, I wasnt able to change the background color of the cell, however cell text color did change with this:

<TD><span style="color: rgb(255,0,0);">red text
</span></TD>

<TD><b><span style="color: rgb(255,0,0);">red text </span><>/b</TD> for bold

0 votes
Axel Meikies October 4, 2019


Here are three macros for setting the background colour for a table cell, table row or the whole table.

I tried the table_cell template in a User-Macro and it still works in Conf. 6.15.

You can use HTML colour or a HTML numeric #value.

The template is in Stackoverflow from Zac Thompson.

You need admin rights to create a user macro.

0 votes
Jonathan Smith June 22, 2017

Yup. Source editor works for the most part in 5.9.10. Welcome to 1998 HTML. 

2017-06-22_10-56-09.jpg

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events