September 14, 201114 yr 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
September 14, 201114 yr 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
September 15, 201114 yr Author Thanks for the response. I couldn't figure out how you came up with the values.
Create an account or sign in to comment