first step to indexed color and bressehan algo