Jump to content
  • 0

open change text color

Go to solution Solved by Asentrix,


I can't figure out how to change the text color of a specific line in the client, to be specific the "Succes rate" of upgrading an item. 

In uirefine.py i have


    def Open(self, scrollItemPos, targetItemPos):
        self.scrollItemPos = scrollItemPos
        self.targetItemPos = targetItemPos

        percentage = self.GetRefineSuccessPercentage(scrollItemPos, targetItemPos)
        if 0 == percentage:
        self.successPercentage.SetText(localeInfo.REFINE_SUCCESS_PROBALITY % (percentage))

        itemIndex = player.GetItemIndex(targetItemPos)
        metinSlot = []
        for i in xrange(player.METIN_SOCKET_MAX_NUM):
            metinSlot.append(player.GetItemMetinSocket(targetItemPos, i))
        self.toolTip.AddItemData(itemIndex, metinSlot)


I think i have to change the color before  self.successPercentage.SetText(localeInfo.REFINE_SUCCESS_PROBALITY % (percentage))   but I couldn't find any function to do so. i'm really bad at Python, thanks for your help.

Link to post

4 answers to this question

Recommended Posts

  • 0
  • VIP
  • Solution
1 minute ago, semoka10 said:

How precisely?

you have to add |cff + hex color

search google for Hex colors 

for example hex color for red is #FF0000

so to use it



so it will be like:

REFINE_SUCCESS_PROBALITY    |cffFF0000Successrate: %d%%


  • Love 1
Link to post
  • 0
  • VIP

Go to your uiscript/refinedialog.py. There is an element called "SuccessPercentage" here find it. This is the success percentage text. If you want it to have a color, simply add this line:

"color" : "red"


It should look something like this:


                    "name" : "SuccessPercentage",
                    "type" : "text",
                    "text" : uiScriptLocale.REFINE_INFO,
	                "color" : "red",
                    "horizontal_align" : "center",
                    "vertical_align" : "bottom",
                    "text_horizontal_align" : "center",
                    "x" : 0,
                    "y" : 70,
Edited by Finnael
  • Love 1
Link to post
This topic is now closed to further replies.



Chatroom Rules


Join our Discord

A request for help = Shoutbox Ban

Be respectful & Respect the rules


  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.