Only brightness (templates method) in working. Rounding still with the issues. Work in progress.
final version