What's new

Welcome to Onforum.net - Web and gaming resource community

Join us now to get access to all our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, and so, so much more. It's also quick and totally free, so what are you waiting for?

Ask question

Ask Questions and Get Answers from Our Community

Answer

Answer Questions and Become an Expert on Your Topic

Contact Staff

Our Experts are Ready to Answer your Questions

Quests /Python Metin2 - Color formatter class

Blaze

Elite
Elite
Joined
Jan 28, 2019
Messages
263
Reaction score
1,836
Points
93
Credits
64
A simple class which convert the values into a string by a specific color name.
Python Color Constants Module:

https://www.webucator.com/blog/2015/03/python-color-constants-module/
https://www.color-hex.com/color/ccffff

Ex-How-To-Use:

text = CFF.format('Metin2', 'green')
text = CFF.format(8000, 'banana')
text = CFF.format(412.55, 'red')
text = CFF.format('Pending', '#113355')
text = CFF.format('Item name:', 'springgreen', CFF.FLAG_NEW_TAB) + CFF.format(item.GetItemName(), 'chocolate')
text = CFF.multi_format(('a', 'b', 'c'), 'red') # text[0], text[1], text[2]
Github repository:
https://github.com/Vegas007/Metin2-Colour-Formatter
 

shape1
shape2
shape3
shape4
shape7
shape8
Top