Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4818 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hello,

In a previous post I had requested a way to convert tagged text to color and or be stylized. I had a reply with the following calc:

Let ( [

formula = Substitute ( "" & Quote ( text ) & "" ;

[ "<RD>" ; Quote ( " & TextColor ( " ) ] ;

[ "</RD>" ; Quote ( " ; 16646400 ) & " ) ] ;

[ "<B>" ; Quote ( " & TextStyleAdd ( " ) ] ;

[ "</B>" ; Quote ( " ; bold ) & " ) ] ;

[ "<I>" ; Quote ( " & TextStyleAdd ( " ) ] ;

[ "</I>" ; Quote ( " ; italic ) & " ) ] )

] ;

Evaluate ( formula )

)

I thought Text Color was always RGB but the above values aren't RGB. What color space is it and how do you calculate the color values? I tried substituting RGB values, but then the calc wouldn't work.

Thanks,

John

Posted

I thought Text Color was always RGB

No, actually the second parameter of the TextColor() function is an indexed color. The help for the RGB() function explains how this number is calculated from discrete R; G; B values, basically =

256^2 * R + 256 * G + B

This topic is 4818 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.