Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Change colors

Gonzalo Fernández Durán
Contributor
March 23, 2020

Hi community,

 

anyone knows how to change the Confluence color range in order to have different options when you are editing a page?

for instance, when i edit a cell or a chart

thanks in advance

 

2 answers

1 accepted

0 votes
Answer accepted
John Theofanopoulos March 23, 2020

Hey,

I see you're running on server - so you can edit the source code of confluence (check article below):

 

https://community.atlassian.com/t5/Confluence-questions/Is-there-any-mechanism-to-add-more-colors-other-than-the-ones/qaq-p/854403

That's hack #1 but also there's another better method to add more colours in your palette:

https://confluence.atlassian.com/confkb/how-to-customize-confluence-editor-s-color-palette-313464920.html

Let me know if that helped.

Gonzalo Fernández Durán
Contributor
March 23, 2020

thanks, i will try

0 votes
Adrian m
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!
March 10, 2022

You can do this with some custom JS as well.:

AJS.bind("init.rte", function () {

const colors = {
'000000': 'Color 1',
'000001': 'Color 2',
'000002': 'Color 3',
'000003': 'Color 4',
'000004': 'Color 5'
};

document.querySelectorAll('body.contenteditor #color-picker-control .color-picker > ul').forEach(colorList => {
colorList.innerHTML = '';
for (const [color, label] of Object.entries(colors)) {
let htmlColor = "#" + color;

colorList.innerHTML += `<li><a href="#" aria-label="${label}" data-tooltip="${label}" style="background-color: ${htmlColor};" data-color="${color}" original-title="">&nbsp;</a></li>`;
}
})
});

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events