src/color/util.js
function sn_color_color(d) {
	var s = Number(d.source);
	if ( isNaN(s) ) {
		return sn.runtime.colorData[d.source];
	}
	return sn.runtime.colorData.reduce(function(c, obj) {
		return (obj.source === d.source ? obj.color : c);
	}, sn.runtime.colorData[0].color);
}
function sn_color_color(d) {
	var s = Number(d.source);
	if ( isNaN(s) ) {
		return sn.runtime.colorData[d.source];
	}
	return sn.runtime.colorData.reduce(function(c, obj) {
		return (obj.source === d.source ? obj.color : c);
	}, sn.runtime.colorData[0].color);
}
function sn_color_color ( d ) { var s = Number ( d . source ) ; if ( isNaN ( s ) ) { return sn . runtime . colorData [ d . source ] ; } return sn . runtime . colorData . reduce ( function ( c , obj ) { return ( obj . source === d . source ? obj . color : c ) ; } , sn . runtime . colorData [ 0 ] . color ) ; }
Use the configured runtime color map to turn a source into a color.

The {@code sn.runtime.colorData} property must be set to a color map object
as returned by {@link sn.colorMap}.

@param {object} d the data element, expected to contain a {@code source} property
@returns {string} color value
@preserve
Use the configured runtime color map to turn a source into a color .