6 Replies Latest reply: Nov 7, 2016 7:37 PM by Angel Monjaras

# Color By Expression Question!!!

This is my current color expression:

if([Fundamental Towing & Job Rating with iShowroom (SSJR03WB)]='L' or [Fundamental Towing & Job Rating with iShowroom (SSJR03WB)]='S' or [Fundamental Towing & Job Rating with iShowroom (SSJR03WB)]='N', lightred(), lightgray())

Which gives me this...

However, I want to be able to give it a color range.

I want "N" to be lightred() and I want S to be an ORANGE color and L to be yellow().

How do I write or modify the above expression to get that?

• ###### Re: Color By Expression Question!!!

May be this

If([Fundamental Towing & Job Rating with iShowroom (SSJR03WB)]='L', Yellow(),

If([Fundamental Towing & Job Rating with iShowroom (SSJR03WB)]='S', RGB(255,128,0),

If([Fundamental Towing & Job Rating with iShowroom (SSJR03WB)]='N', LightRed(), LightGray())))

• ###### Re: Color By Expression Question!!!

Hi Sunny,

Okay, that worked. But I don't actually like the feel of it like I thought I was going to.

If there a way to do a variation or lightred? So N would be light red and S would be a little lighter then lightred and S would be the lightest?

• ###### Re: Color By Expression Question!!!

You can use ARGB() function to use a variation...

If([Fundamental Towing & Job Rating with iShowroom (SSJR03WB)]='L', ARGB(150, 255, 0, 0),

If([Fundamental Towing & Job Rating with iShowroom (SSJR03WB)]='S', ARGB(200, 255, 0, 0),

If([Fundamental Towing & Job Rating with iShowroom (SSJR03WB)]='N', ARGB(255, 255, 0, 0), LightGray())))

You can play around with the first argument of ARGB() to make it brighter or lighter. Higher number is brighter, and lower number as lighter

• ###### Re: Color By Expression Question!!!

Thank you SUNNY!

• ###### Re: Color By Expression Question!!!

Hi Sunny,

I searched this post hoping to find an answer (similar to what you did for Lauren).

Instead of color ranges, i tried to substitute with colors:

If([Fundamental Towing & Job Rating with iShowroom (SSJR03WB)]='L', purple(),

If([Fundamental Towing & Job Rating with iShowroom (SSJR03WB)]='S', green(),

If([Fundamental Towing & Job Rating with iShowroom (SSJR03WB)]='N', darkgray(), LightGray())))

When I did so, it didn't work what am i doing wrong?

Thanks!

• ###### Re: Color By Expression Question!!!

Hello Pauline,

purple() is not a valid color function. You can try cyan() instead.

Regards.