Skip to content

Gradients - Sort Stops by Value

Eoin O'Neill requested to merge (removed):gradientValueSorting into master

Summary

This merge request adds a right click context menu to the gradient editor widget with the ability to sort gradients by value. Sort by Value simply sorts the values onto the gradient space by the actual value of the color, often creating an uneven distribution. Sort by Value (Even Distribution) likewise sorts the stops by value but, instead of placing them on the gradient space by the color's value, it evenly distributes the colors across the entire gradient space. Both of these sorting operations can be flipped using the reverse button or the reverse option in the right click menu.

Testing

Simply create a new gradient resource or a gradient fill layer and try right clicking on the GradientEditor widget.

Examples

Sort by Value

Gradient Sort by Value Example

Sort by Value (Even Distribution)

Gradient Sort by Value Even Distribution Example

Future Additions

It might be nice to have a few sorting types such as Sort by Opacity and Sort by Hue, but that doesn't have to come right away. Adding those options should be relatively easy with the framework I have provided here.

Merge request reports