User:Cappucciruno/sandbox/Template:Item

This would be a template page with code. Input: pageName Output: link to pageName, with color depending on a variable in pageName