The script I provided was based upon having the Column Property "Value Colors" set. Apparently your starting data table does not have them set.
I have changed the JSL to use the "Gradient Colors" Column Property. I also changed the code to set the "Color Gradient" on the initial data table, so it now ensures that when the new data table is being created, that it has what it needs to set the colors for the cells.
Names Default To Here( 1 );
dt = Current Data Table();
// Set the color gradient column property
dt:binding proportion << set property("color gradient", {"Green Yellow Red"(1), Range( {6.2, 87.38, 25.6941666666667} )});
dt:binding proportion<<color cell by value;
// Use Tabulate to create the transformed table
(tab = dt << Tabulate(
Change Item Label( Statistics( Mean, " " ) ),
Remove Column Label( Analysis Columns( Binding proportion ) ),
Add Table(
Column Table( Grouping Columns( :pH ), Statistics( Mean ), Analysis Columns( :Binding proportion ) ),
Row Table( Grouping Columns( :"[NaCl]"n ) )
)
)) << Make Into Data Table;
Current Data Table() << set name( "Final" );
dtFinal = Current Data Table();
Report( tab ) << close window;
// change column names and set the Color Gradient
valColors = dt:Binding proportion << get property("Color gradient");
For( i = 2, i <= N Cols( dtFinal ), i++,
Column( dtFinal, i ) << set name( Word( -1, Trim( Column( dtFinal, i ) << get name ), "()," ) );
Column( dtFinal, i ) << set property("Color Gradient", eval(valColors));
Column(dtFinal,i)<<color cell by value;
Column(dtFinal,i)<<set display width(40);
);
Jim