Making Colorful Labels in ArcGIS

Today I will describe how to make cute colorful labels in ArcGIS 10. You can always color your shapes but how do you color your labels on your map? follow me.

This tips will allow you to make labels over map like this.


1. Open your feature properties and select ‘labels’ tab.

2. Hit ‘Expression’ button. You’ll something like this,


In the expression section we will write few code. The code here is

“<CLR blue=’255′>” & [Label] &”</CLR>”& vbNewLine & “Shape Index – ” &”<CLR red=’255′ >” & [Shape_index] & “</CLR>”

to verify if it is ok click ‘verify’

VIOLA!
ArcGIS 10 help menu says,

Fields are enclosed in square brackets [ ] irrespective of the data type of the layer’s data source.  Field values are automatically cast to text strings; therefore, if you wish to use a numeric value in an arithmetic operation you will need to cast it back to a numeric data type.

The expression is limited to a single line of code, unless you check the Advanced box. Checking the Advanced box allows you to enter a function containing programming logic and spanning multiple lines of code.

You can always try these codes and make something fasionable !

Font:

"<FNT name='Arial' size='18'>" & [LABELFIELD] & "</FNT>"

"<FNT name='Arial' scale='200'>" & [LABELFIELD] & "</FNT>"

Color:
"<CLR red='255' green='255' blue='255'>" & [LABELFIELD] & "</CLR>"

"<CLR cyan='100' magenta ='100' yellow='100' black='100'>" & [LABELFIELD] & "</CLR>"

Bold:

"<BOL>" & [LABELFIELD] & "</BOL>"

Italic:

"<ITA>" & [LABELFIELD] & "</ITA>"

Underline:

"<UND>" & [LABELFIELD] & "</UND>"

All caps:

"<ACP>" & [LABELFIELD] & "</ACP>"

Small caps:

"<SCP>" & [LABELFIELD] & "</SCP>"

Superscript

"<SUP>" & [LABELFIELD] & "</SUP>"

Subscript:

"<SUB>" & [LABELFIELD] & "</SUB>"

Character spacing (0%=regular):

"<CHR spacing='25'>" & [LABELFIELD] & "</CHR>"

Character width (100%=regular):

"<CHR width='150'>" & [LABELFIELD] & "</CHR>"

Word spacing (100%=regular):

"<WRD spacing='150'>" & [LABELFIELD] & "</WRD>"

Leading (0 pts=regular):

"<LIN leading='12'>" & [LABELFIELD] & "</LIN>"

Un-Bold:

"<_BOL>" & [LABELFIELD] & "</_BOL>"

Un-Italic:

"<_ITA>" & [LABELFIELD] & "</_ITA>"

Un-Underline:

"<_UND>" & [LABELFIELD] & "</_UND>"

Un-Superscript:

"<_SUP>" & [LABELFIELD] & "</_SUP>"

Un-Subscript:

"<_SUB>" & [LABELFIELD] & "</_SUB>"

For more please hit the ‘help’ button in the expression window.

Sources:  About building label expressions

1 Comment

  1. nice Sunbeam, you ‘re genius, regards. 3dbu