-
-
Notifications
You must be signed in to change notification settings - Fork 265
NeoHueBlend objects
These "method" objects are used to define how the blend functions on HslColor and HsbColor are done. Due to the circular nature of Hue value for these objects, the blend can happen multiple ways.
Wikipedia Entry on HSL and HSV
For this library, the Hue value is 0.0 to 1.0 instead of 0.0 to 360.0. Further, clockwise is considered within the context of a clock, where numbers increase when going clockwise, so does the Hue value increase when going clockwise.
Hue is interesting in that Red is represented as both 0.0 and 1.0 and this value difference can be important in getting the results you want.
This method object will blend the hue along the shortest distance around the wheel between the two colors.
This should be the most common one you will want to use, unless you have a specific need otherwise.
So blending from green (0.66) to blue (0.33) will blend counter clockwise rather than the longer distance clockwise through red (0.0 or 1.0).
This method object will blend the hue along the longest distance around the wheel between the two colors.
So blending from green (0.66) to blue (0.33) will blend clockwise through red (0.0 or 1.0) rather than the shortest distance directly to blue.
This method object will blend the hue clockwise around the wheel from the left color to the right color.
This is handy to use to create a full color blend effect. If you blend from Red (0.0) to Red (1.0) it will give you every color in the wheel.
This method object will blend the hue counter-clockwise around the wheel from the left color to the right color.