lib/ui/charting/js_charting.js
function(fillColor) {
            var fillColorHex = this.colorUtils.hexFromColor(fillColor),
                luminanceThreshold = 128,
                darkColor = 'black',
                lightColor = 'white',
                fillLuminance = this.colorUtils.getLuminance(fillColorHex);

            return (fillLuminance < luminanceThreshold) ? lightColor : darkColor;
        }
function(fillColor) {
            var fillColorHex = this.colorUtils.hexFromColor(fillColor),
                luminanceThreshold = 128,
                darkColor = 'black',
                lightColor = 'white',
                fillLuminance = this.colorUtils.getLuminance(fillColorHex);

            return (fillLuminance < luminanceThreshold) ? lightColor : darkColor;
        }
function ( fillColor ) { var fillColorHex = this . colorUtils . hexFromColor ( fillColor ) , luminanceThreshold = 128 , darkColor = 'black' , lightColor = 'white' , fillLuminance = this . colorUtils . getLuminance ( fillColorHex ) ; return ( fillLuminance < luminanceThreshold ) ? lightColor : darkColor ; }
use the value to determine the fill color, then use that color's luminance determine if a light or dark font color should be used
use the value to determine the fill color then use that color s luminance determine if a light or dark font color should be used