Ogeon / palette

A Rust library for linear color calculations and conversion
Apache License 2.0
752 stars 60 forks source link

Add "component blend modes", also known as "non-separable blend modes" #274

Open Ogeon opened 2 years ago

Ogeon commented 2 years ago

Description

Add the remaining blend modes from https://www.w3.org/TR/compositing-1: hue, saturation, color, luminosity. Also try to implement them for polar color spaces, as suggested in #178, to be able to close it. They should be implemented as their own trait, since they are quite different form other blend modes. The color types must have some counterpart to the auxiliary functions that they consist of.

Motivation

These blend modes are also useful and should not be left out. The trait rework in #273 makes it easier to implement them than before, so it's time for another attempt. It would complete the set of blend modes.