AnsweredAssumed Answered

Color Integers in a DT (may be more of an Excel Question)

Question asked by Alan Stoldt on Aug 9, 2010
Latest reply on Aug 11, 2010 by Alan Stoldt

Ok, I was trying something else and started chasing rabbits.

 

RGB Color Formulas.JPG

(above from the Help files:)

 

So, in a DT I want to reverse this formula and solve for R, G and B.

 

I found this post somewhere when I googled.

 

RGB Code.jpg

 

So, for R I have

 

=MOD(256,B3) (where cell B3 is the Integer for the color)

 

So, for G I have

 

=MOD(256,(B3/256)) (where cell B3 is the Integer for the color)

 

So, for B I have

 

=MOD(256,(B3/256/256)) (where cell B3 is the Integer for the color)

 

with the following results.

 

DT RGB Colors.JPG

 

I know SW flips these values around all day long behind the scenes. I'm not into API and just wanted to get this DT to function like I want.

 

Any thoguhts or solution for getting the equations right is appreciated.

 

Thanks in advance.

 

Alan

Outcomes