Moved background color calculation to object constructor