Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
nikhilgarg
Specialist II
Specialist II

How to give values in RGB() ??

In the following script :

if(Year=2009,RGB (205, 205, 205),

if(Year=2010,RGB (153, 153, 153),

if(Year=2011,RGB (100, 100, 100),

if(Year=2012,RGB (51, 51, 51),

if(Year=2013 and date>='8/2/2013',ARGB (80, 255, 0, 0),RGB(255,0,0)

)))))

How to give values to RGB() ??

WHat is ARGB() ??

How ARGB() differ from RGB() ??

Please help.

Thanx.

1 Solution

Accepted Solutions
Anonymous
Not applicable

No you dont have to put random values....

In the color p[roperties you can get what RGB values create which color.

Values in Red, Green, Blue represents RGB values respectively.

For alpha , it sets the the transparency for the color.....

The values for "A" also lies between 0 to 255 as for RGB,

If A=0, then color will be 100 % transparent, and if A=255, its opaque....

RGB.PNG.png

View solution in original post

6 Replies
tresesco
MVP
MVP

Nikhil,

These theoritical questions are answered in the help/refrence manual in best possible way. Please refer that and don't hesitate to come back here in the community if you have a doubt after that.

Anonymous
Not applicable

RGB (e1, e2, e3 )

This function returns the color representation of a color defined by the red component e1, the green component e2 and the blue component e3. All three parameters must be expressions evaluating to integers in the range between 0 and 255. The color representation is a dual value where the text representation comes in the form of 'RGB(r, g, b)' where r, g and b are numbers between 0 and 255 representing the red, green and blue color value respectively. The number representation is an integer representing the red, green and blue components as they are defined in Visual Basic.

ARGB(alpha, e1, e2, e3)

This function returns the color representation of a color defined by the red component e1, the green component e2 and the blue component e3 with an alpha factor (opacity) of alpha. All four parameters must be expressions evaluating to integers in the range between 0 and 255. The color representation is a dual value where the text representation comes in the form of 'RGB(a,r, g, b)' where a, r, g and b are numbers between 0 and 255 representing the alpha, red, green and blue color value respectively. The number representation is an integer representing the alpha, red, green and blue components as defined in Visual Basic.

nikhilgarg
Specialist II
Specialist II
Author

Hey,

THanx

nikhilgarg
Specialist II
Specialist II
Author

Hey,

Thanx. But can you tell me what does this alpha does exactly ??

And how would a developer new to qlikview know what values to feed in RGB() ?? Do we have to put  random values ?? Please help.

Anonymous
Not applicable

No you dont have to put random values....

In the color p[roperties you can get what RGB values create which color.

Values in Red, Green, Blue represents RGB values respectively.

For alpha , it sets the the transparency for the color.....

The values for "A" also lies between 0 to 255 as for RGB,

If A=0, then color will be 100 % transparent, and if A=255, its opaque....

RGB.PNG.png

nikhilgarg
Specialist II
Specialist II
Author

Hey,

Many many thanx