Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Custom Colors Using Color Expressions

Hi I have a combo bar chart setup which has week as dimension and 3 measures: sales last year, sales this year and target.

How do i use color expression in 'colors and legend' section  ' colors' 'custom by expression' field: i want sales last year bar to be #585858 and sales this year to be '#df7254' and target to be '#8fbfc0'.

what's the expression i should enter to get these colours?

Thanks

7 Replies
robert_mika
Master III
Master III

#585858 is the same as RGB(88,88,88)

Did you try to use Background Color of Expression?

Click the '+' sign next to expression to see more options and use RGB(88,88,88) in Definition field.

Not applicable
Author

hi robert,

no, i don't see this option anywhere. i need to create an expression like sales ly = #585858, sales this year #df7254, target #8fbfc0

Capture.PNG

Not applicable
Author

Can anybody help with this please. All i want to is enter an expression into the color expression box so i can choose what colors these bars will be myself.

Capture.PNG

Anonymous
Not applicable
Author

Enter:

rgb(0,0,255)

or whatever color you want.  This one is blue.

Not applicable
Author

‌yes but what expression do I use to get different colours for each of the bars. I don't want them all to be blue. I want one of them to be green, one of them to be purple and one of them to be black.

Anonymous
Not applicable
Author

If you have only one measure,there will be conditional color expression:

if(condition1, color1, (if (condition2, color2, color3))

If you have multiple separate measures, don't use color "by expression", use "multicolored" instead.

Not applicable
Author

‌i have different measures So what expression should I use to give each one a different colour. Multicoloured won't let me choose the colourS myself.