Skip to main content
Alan_AEDScripts
Inspiring
Dec 9, 2013 2:56 PM UTC
Question

Color Labels

What kind of data are label colors being saved as in prefs ?

I know this was discussed in a post but can't find the exact post....

Thanks

Alan.

"Label Color ID 2 # 1" = FFB60505

          "Label Color ID 2 # 10" = FF8E","9A

          "Label Color ID 2 # 11" = FFC8"~"0C

          "Label Color ID 2 # 12" = FF7F"E*"

This topic is closed to new replies. Start a new post to keep the conversation going.

20 replies

zsaaro
Inspiring
Apr 21, 2022 1:38 PM UTC

I have posted my solution for this here:

https://github.com/GoodBoyNinja/Get-Layers-Label-Colors-using-CEP

Translate
Legend
Dec 10, 2013 11:32 PM UTC

I would assume string given that prefs can be saved or retrieved via these methods:

app.preferences

     .deletePref()

     .getPrefAsBool()

     .getPrefAsFloat()

     .getPrefAsLong()

     .getPrefAsString()

     .havePref()

     .reload()

     .savePrefAsBool()

     .savePrefAsFloat()

     .savePrefAsLong()

     .savePrefAsString()

     .saveToDisk()

Translate
Alan_AEDScripts
Inspiring
Dec 11, 2013 2:16 PM UTC

Thanks David, but I am trying to figure out how the colours are represented in these strings, don't recognise the data format...

thanks.

Translate
Legend
Dec 11, 2013 8:02 PM UTC

Ah, gotcha. They look encoded somehow, instead of hex values. I was getting strange results retrieving them with getPrefAsString().

Translate