This PR adds a new subcommand: sort-by-binary-operation. The command takes a required binary operation argument, a single required operand color argument, and an optional list of colors. It then sorts the list of colors by the result of applying the given binary operation with the given operand color.
For example:
pastel sort-by-binary-operation distance #ff4500 red orange
Would act as:
This PR adds a new subcommand: sort-by-binary-operation. The command takes a required
binary operation
argument, a single requiredoperand color
argument, and an optional list of colors. It then sorts the list of colors by the result of applying the givenbinary operation
with the givenoperand color
.For example:
pastel sort-by-binary-operation distance #ff4500 red orange
Would act as:And you would come to find that the color of Reddit upvotes are indeed closer perceived as red than orange.
This is the list of
binary operation
options:They are the orderable binary operations of
Color
.Some use cases are: