--[SCRIPT]
set colors_loc to {}
(*
Grab the default localized colors names *)
repeat with i from 0 to 7
copy (my get_color_loc(i)) to end of colors_loc
end repeat
(*Aucun, Gris, Vert, Violet, Bleu, Jaune, Rouge, Orange*)
set thePlist to (path to preferences from user domain as text) & "com.apple.Labels.plist"
tell application "System Events"
tell contents of property list file thePlist
(*
Grab the custom color names *)
repeat with i from 1 to 7
try
value of property list item ("Label_Name_" & i)
set item (i + 1) of colors_loc to result
end try
end repeat
end tell
end tell
colors_loc
{"Aucun", "Gris", "VertVert", "VioletPurple", "Bleu", "Jaune", "Rouge", "Orange"}
--=====
on get_color_loc(num)
set path2res to "" & (path to library folder from system domain) & "Frameworks:ApplicationServices.framework:Versions:A:Frameworks:HIServices.framework:Versions:A:Resources:"
tell application "Finder" to return localized string ("Label_Name_" & num) from table "Labels" in bundle file path2res
end get_color_loc
--=====
--[/SCRIPT]