added range check before editing link attributes when changing tint color