John.M Posted September 14, 2011 Posted September 14, 2011 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
comment Posted September 14, 2011 Posted September 14, 2011 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
John.M Posted September 15, 2011 Author Posted September 15, 2011 Thanks for the response. I couldn't figure out how you came up with the values.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now