Tracy Schloss the code below works for me and adds a text shadow to the labels:
<!DOCTYPE html>
<html>
<head>
<title>Create a Map</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<link rel="stylesheet" href="http://js.arcgis.com/3.14/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="http://js.arcgis.com/3.14/esri/css/esri.css">
<style>
html, body, #mapDiv{
padding: 0;
margin: 0;
height: 100%;
}
text[fill="rgb(127, 82, 83)"]{
text-shadow: 1px 1px #DCE1E3;
}
</style>
<script src="http://js.arcgis.com/3.14/"></script>
<script>
require([
"esri/map",
"esri/layers/FeatureLayer",
"esri/layers/LabelClass",
"esri/symbols/TextSymbol",
"dojo/domReady!"], function(
Map, FeatureLayer,
LabelClass, TextSymbol
) {
var map = new Map("mapDiv", {
center: [-56.049, 38.485],
zoom: 3,
basemap: "dark-gray",
showLabels: true
});
var states = new FeatureLayer("http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/3",{
outFields: ["*"]
});
map.addLayer(states);
// Setup label properties (SUB_REGION)
var statesLabels = new LabelClass({
labelExpressionInfo: {"value": "{STATE_NAME}"},
symbol: {
"type": "esriTS",
"color": [127,82,83,255],
"font": {
"family": "Arial",
"size": "16px"
}
}
});
// Apply label info to the feature layer
states.setLabelingInfo([statesLabels]);
});
</script>
</head>
<body class="claro">
<div id="mapDiv"></div>
</body>
</html>