blend

package
v0.0.10-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cam16Ucs

func Cam16Ucs(from color.ARGB, to color.ARGB, amount float64) color.ARGB

Cam16Ucs blends colors in CAM16-UCS uniform color space.

Params:

  • from: Starting color in CAM16-UCS.
  • to: Target color in CAM16-UCS.
  • amount: Interpolation factor (0.0-1.0).

Returns color.ARGB - Fully blended color with interpolated attributes. Blends all color attributes (hue, chroma, tone) simultaneously.

func Harmonize

func Harmonize(designColor color.ARGB, sourceColor color.ARGB) color.ARGB

Harmonize adjusts hue of designColor to be closer to sourceColor's hue.

Params:

  • designColor: Color to adjust.
  • sourceColor: Color to harmonize towards.

Returns color.ARGB - Adjusted color with preserved chroma and tone. Hue is rotated towards sourceColor by up to 15 degrees.

func HctHue

func HctHue(from color.ARGB, to color.ARGB, amount float64) color.ARGB

HctHue blends hue of from towards to in HCT space while preserving chroma.

Params:

  • from: Starting color.
  • to: Target color.
  • amount: Blend ratio (0.0-1.0, 0.0=from, 1.0=to).

Returns color.ARGB - Color with blended hue but original chroma and tone. Panics if amount is outside [0.0, 1.0].

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL