How do I change the text color for a JIRA panel or code macro?

Stephen Dixon July 30, 2017

JIRA Service Desk Cloud

The example I want to achieve is green text on black background. E.g.:

{code:title=Black background, green text|titleBGColor=#000000|titleColor=#00CC00|bgColor=#000000|color=#00CC00}
Cannot read this as the font is only a slightly lighter black too!
{code}

The title color has changed which was unexpected as it is not defined in the "Text Formatting Notation" for "Advanced Formatting" (https://jira.atlassian.com/secure/WikiRendererHelpAction.jspa?section=advanced).

However, the text color in the body has not gone green. What parameter should I use for the body text color?

Thanks, Stephen D

1 answer

1 accepted

1 vote
Answer accepted
Christoph Schötz
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 31, 2017

Stephen - you have used the titleColor attribute - if you remove it the color should not change. For the text color in the panel just use the panel macro instead of the code macro and then you should be able to use the color macro (https://jira.atlassian.com/secure/WikiRendererHelpAction.jspa?section=texteffects) inside of the panel I guess.

Cheers

Christoph

Stephen Dixon August 1, 2017

Thanks Christoph for your response, however it does not quite give me what I want.

{panel:title=Black background, green text|titleBGColor=#000000|titleColor=#00CC00|bgColor=#000000|color=#00CC00}
{color:#00CC00}{{Cannot read this as the font is only a slightly lighter black too!}}{color}
{panel}

The above panel gives me part of what I want which is green text in the body. But the font of the title is standard (variable space) font rather than a mono-spaced font.

What I am looking for is both the title and body font colours to be controlled from the open {code} (or {panel}) macros as originally illustrated.

The {{titleColor}} was an accidental find while I was testing, and is something I was trying to do. It is something I would have expected for the body as well. I was surprised that the text notation notes did not advertise it as a parameter.

Stephen D

Christoph Schötz
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.
August 1, 2017

You're welcome - I guess you are experiencing the limitations of JIRA formatting... However you could try to include some style sheet e.g. in the announcement banner. Or use something like JEditor. Do you want to have all code macros formatted like this? Only in JIRA or also in the service desk customer view?

Cheers 

Christoph 

Stephen Dixon August 2, 2017

In JIRA as needed, not all the time. I might use it for a customer view.

It is something I would like to be able to do, but probably not in my current context.

If it is a limitation, then I think it is a suggestion to have it added to the options.

I am a typographer from way back so I would have expected that if you can change the background color (title and body) that you would also be able to change the font color for both places.

As for changing the style sheet, I do not have access to that.

Christoph Schötz
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.
August 2, 2017

Hey - how about contacting the Atlassian support and ask them about this formatting option - this way you can make sure that it is currently not possible and let it add to the suggestion backlog?

Cheers 

Christoph 

Ian Hutchinson June 6, 2019

I Know that this is old, but I figured it out.

 

{color:white}{panel:title=Issue Summary|borderColor=#000000|titleBGColor=#AFD5F2|bgColor=#DFEFF9}{color}

 

Boom chaka!

Like # people like this
Stephen Dixon June 6, 2019

That is a work around.

However, it does not address that if you can change the background colour, you should be able to change the foreground colour too, in the macro.

Nesting is an option in the meantime.

SB November 28, 2021

works now!


{panel:title=Black background, green text|titleBGColor=#000000|titleColor=#00CC00|bgColor=#000000|color=#00CC00}
{color:#00CC00}{{Cannot read this as the font is only a slightly lighter black too!}}{color}
{panel}

(But I bet you know that! ;) )

Kerly Roselly Martinez Castro April 27, 2022

tengo este comentario 

{color:#333333}7 comentario de prueba de caso cs -48{color}




{color:#222222}{color}{color:#1f497d}Saludos Cordiales.{color}{color:#222222}{color}

{color:#1f497d}Kerly{color} {color:#1f497d}Martínez{color}

{color:#222222}{color}{color:#1f497d} *DESARROLADOR JUNIOR*{color}{color:#222222}{color}

{color:#222222}{color}{color:#1f497d} *e-mail:*{color} [{color:#1f497d}{color}{color:#1155cc}kmartinez@siatigroup.com{color}|mailto:kmartinez@siatigroup.com]{color:#1155cc}{color}{color:#1f497d}{color}
{color:#222222}{color}

{color:#222222}{color}{color:#1f497d} *Dirección:* Yasuní N44-284 y Av. El Inca{color}{color:#222222}{color}

{color:#222222}{color}{color:#1f497d}* {color}{color:#222222} *{color}{color:#1f497d} *PBX:*{color}{color:#222222}{color} {color:#1f497d} (593) 2-2249 599 /{color} {color:#222222}{color}{color:#1f497d}({color}{color:#222222}{color}{color:#1f497d}593){color} {color:#222222}{color}{color:#1d406b}2-2439 910{color}{color:#222222}{color}{color:#222222}{color}{color:black}{color}{color:#0563c1}{color}

[{color:#0563c1}{color}{color:#1155cc}www.siatigroup.com{color}|http://www.siatigroup.com/]{color:#1155cc}{color}{color:#0563c1}{color}{color:black}{color}{color:#222222}{color}

{color:#222222}{color}{color:#1f497d}Quito - Ecuador{color}{color:#222222}{color}{color:black}{color}
{color:#222222}{color}{color:#222222}{color}

!https://docs.google.com/uc?export=download&id=1qS6dZExyR2ltjRCgrBmqjF4Bn63p72m4&revid=0B96fLLtTu-3Fc0ZOUkNWQU03UDMwMXRRQndPcWlhL0xoRVVRPQ!{color:#222222}{color}{color:#000000}{color}{color:#222222}{color}

 

y lo estoy enviando en  una notificacion, y no se como darle formato para que en la notificacion no se vea el codigo asi, quien me puede ayudar

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events