Outch, pour moi c'est bien moins lisible ! (Peut-être du aux tabulations qui rendent très mal !)
Je verais plus un truc comme :

ColorPickerContext.selected_red = ( 1 - (cursor.y / height) ...