blendColor: HSV Color Channel Blending
HSV Color Space Manipulation
Color blending operates in HSV color space to achieve natural color mixing behavior. This mode transfers hue and saturation from the blend layer while preserving the value (brightness) of the base layer.
The mathematical process involves:
This approach maintains the original brightness distribution while applying new color characteristics.
Color Component Behavior
Component | Source | Effect | Mathematical Role |
---|---|---|---|
Hue | Blend layer | Color identity | |
Saturation | Blend layer | Color intensity | |
Value | Base layer | Brightness structure | |
Alpha | Opacity control | Blending strength | Linear interpolation weight |
ライブエディター
const fragment = () => { const grid = uv.mul(8).floor() const checker = grid.x.add(grid.y).mod(2) const basePattern = vec3(0.8).mul(checker).add(vec3(0.2)) const colorWheel = vec3( uv.x.mul(6.28).sin().mul(0.5).add(0.5), uv.y.mul(6.28).cos().mul(0.5).add(0.5), uv.x.add(uv.y).mul(3.14).sin().mul(0.5).add(0.5) ) const result = blendColor(basePattern, colorWheel) return vec4(result, 1) }