Changes
change hasBackgroundColors to check titlestyle/groupstyle/basestyle contains the word background
local function hasBackgroundColors()
return mw.ustring.match(args.titlestyle or '','background') or mw.ustring.match(args.groupstyleor '','background') or mw.ustring.match(args.basestyle or '','background')
end