You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To be honest, I've employed a number of ingenious tactics to reach certain end goals. For example, the color temperature utilities isCool and isWarm make use of a map object that has hue families such as blue or green as top nodes and each node containing a warm and cool key that in turn has an array with two values: a starting and ending range for the hue family's warm/cool colors.
The functions do an inRange check to determine if the color's hue channel value is found in the warm or cool range of that hue family. This determines the final Boolean value of the predicate.
This may seem like a naive approach but I think for the sake of our use cases it is sufficient for now.
The library is open for adjustments to the underlying implementation as long as we maintain the high level API unaffected.
Thoughts on how functionality could be improved are greatly appreciated!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
To be honest, I've employed a number of ingenious tactics to reach certain end goals. For example, the color temperature utilities
isCool
andisWarm
make use of a map object that has hue families such as blue or green as top nodes and each node containing awarm
andcool
key that in turn has an array with two values: a starting and ending range for the hue family's warm/cool colors.The functions do an inRange check to determine if the color's hue channel value is found in the warm or cool range of that hue family. This determines the final Boolean value of the predicate.
This may seem like a naive approach but I think for the sake of our use cases it is sufficient for now.
The library is open for adjustments to the underlying implementation as long as we maintain the high level API unaffected.
Thoughts on how functionality could be improved are greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions