dt << Color Rows by Row State;
dt = Open( "$SAMPLE_DATA\Big Class.jmp" );
:height << Set Property(
	"Color Gradient",
	{"White to Blue", Range( 40, 80 )}
);
:height << Color Cell By Value( 1 ); // turn on the cell coloring
 
:age << Set Property(
	"Value Colors", // assign the value colors
	{12 = Red, 13 = Yellow, 14 = Green, 15 = Blue, 16 = Magenta, 17 =
	Gray}
);
 
:age << Color Cell By Value( 0 ); // turn off the cell coloring
 
:name << Color Cells( red, {1, 5, 8} );
:name << Color Cells( black, {1} );
You can color cells based on specific values. The following example colors the cells in the height column. All cells containing a value greater than 60 are blue. All cells containing a value equal to or less than 60 are purple.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
For( i = 1, i <= N Row( dt ), i++,
	If( Column( dt, "height" )[i] > 60,
		Column( dt, "height" ) << Color Cells( 5, {i} ),
		Column( dt, "height" ) << Color Cells( 8, {i} )
	)
);
Note: The first argument for Color Cells represents the color value. The second argument contains the row numbers.