HUE transition algorithm has been improoved

Signed-off-by: denis-m-tyurin <denis.m.turin@gmail.com>