Fix tools._ColorFormatter.get_value
Fix tools._ColorFormatter.get_value

My amendments to 9146f17 introduced a crash.

Bug: T118371
Change-Id: I85bf51d75390c06c36fd532f2f56e656846a538c

magul/pywikibot-core,hasteur/g13bot_tools_new,hasteur/g13bot_tools_new,smalyshev/pywikibot-core,npdoty/pywikibot,magul/pywikibot-core,wikimedia/pywikibot-core,happy5214/pywikibot-core,npdoty/pywikibot,jayvdb/pywikibot-core,PersianWikipedia/pywikibot-core,Darkdadaah/pywikibot-core,hasteur/g13bot_tools_new,Darkdadaah/pywikibot-core,jayvdb/pywikibot-core,darthbhyrava/pywikibot-local,h4ck3rm1k3/pywikibot-core,h4ck3rm1k3/pywikibot-core,wikimedia/pywikibot-core,happy5214/pywikibot-core