Merge "Use median of border brightness as rotation background color" into main