Factored out duplicated values between BarGraphForeground and BarGraphBackground, see #290