Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
niha
Creator II
Creator II

RGB() values of Some colors

Hello,

I created Bar Chart and I want to give color like below. I have written condition color like below.

if( [Service Year Number]= '2014', rgb(-192,192,192),
if( [Service Year Number] = '2015', rgb(255, 0, 0),
if( [Service Year Number]= '2016', rgb(100, 149, 175),
if( [Service Year Number]= '2017', rgb(100, 149, 150),
if([Service Year Number] = '2018', rgb(100, 110, 150),
if([Service Year Number] = '2019', rgb(100, 110, 150),'grey'))))))

But my RGB code is not correct. I want to know the RGB code of following col. Please suggest.

Regards,

Niha

Untitled.png

1 Solution

Accepted Solutions
Anil_Babu_Samineni

Can't you do by yourself. If not, Follow like below to get exact RGB. Make sure, If your system graphics not the same. you won't feel like that.

Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

10 Replies
lironbaram
Partner - Master III
Partner - Master III

hi

In Qlik sense when you want to give specific colors to a specific values in a dimension
the recommended way is to build a master item dimension in case for  [Service year number]

and in the master item definitions assign colors to the values , that way when ever you'll use the dimension 

in your app the coloring will be the same  

 

formosasol
Partner - Contributor III
Partner - Contributor III

Hi,

Maybe you can use the following and replace the Red() with RGB () Values

 

if(sum([Actual Amount]-[Budget Amount])/ Sum([Budget Amount])<'-0.01%',Green(),
if(sum([Actual Amount]-[Budget Amount])/ Sum([Budget Amount])='0.00%',Blue(),
if(sum([Actual Amount]-[Budget Amount])/ Sum([Budget Amount])<='6.00%',Magenta(),
if(sum([Actual Amount]-[Budget Amount])/ Sum([Budget Amount])<='7.00%',LightRed(),
if(sum([Actual Amount]-[Budget Amount])/ Sum([Budget Amount])>'8.00%',Red())))))

 

Regards

Frank

rogerpegler
Creator II
Creator II

If it's the actual RGB codes you are looking for, you can use the colour pallet found under presentation/colours for many objects. Select the desired colour in the pallet and enter the resulting hex code, including the leading '#', as the value to the RGB function eg RGB(#0000ff).

niha
Creator II
Creator II
Author

hi,

I tried your syggestion. 

If(State = 'State of Florida', RGB(#0000ff),
If( State = 'AvMed Excel SOF', RGB(119,0,0),RGB(0,0,128)))

but giving error. I tried above code.

niha
Creator II
Creator II
Author

hi,

I tried your syggestion. 

If(State = 'State of Florida', RGB(#0000ff),
If( State = 'AvMed Excel SOF', RGB(119,0,0),RGB(0,0,128)))

but giving error. I tried above code.
niha
Creator II
Creator II
Author

Hi,
I have tried Red and Light Red also but this is not the exact col they want.
Thanks.
niha
Creator II
Creator II
Author

hi,

Thanks. I created a dimension in Master Item and you mean in expression I will write like this?

if( [Service Year Number]= '2014', rgb(-192,192,192),
if( [Service Year Number] = '2015', rgb(255, 0, 0),
if( [Service Year Number]= '2016', rgb(100, 149, 175),
if( [Service Year Number]= '2017', rgb(100, 149, 150),
if([Service Year Number] = '2018', rgb(100, 110, 150),
if([Service Year Number] = '2019', rgb(100, 110, 150),'grey'))))))

 

 

niha
Creator II
Creator II
Author

In short,

I want the RGB value of the exact color.

Untitled.pngRegards,

Niha

Anil_Babu_Samineni

Can't you do by yourself. If not, Follow like below to get exact RGB. Make sure, If your system graphics not the same. you won't feel like that.

Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful