TransWikia.com

Changing individual text colour in Label Expression using Python in ArcGIS

Geographic Information Systems Asked by Snorku on January 8, 2021

I’m basic at Python and I would like to change a single value colour to red, in this case the 6.36 value.

enter image description here

I’m using this code:

[Nazwa] + "/" + [PPW]  + "/" + [DPW]

So I wanted to change the colour of [DPW] to red. I was also thinking about using string, due to summing up the values before, don’t know why.

str( [Nazwa] ) + "/" + str( [PPW] )  + "/" + str ( [DPW] )

One Answer

Try doing this:-

[STATE_NAME] +  " "  + "<CLR red='255'>" + [POP2000]  + "</CLR>"

enter image description here

You can follow the below documentation for a better understanding.

Specify text for labels

Correct answer by Yogesh Chavan on January 8, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP