Skip to content

Colorise

Taiizor edited this page Mar 1, 2023 · 13 revisions

Colorise Class - Skylark.Standard.Helper Namespace

The Colorise class that provides color blending functionality.

Methods

ToBlend

Blends the given color with another color.

Parameters:

  • RGB: The first color to blend.
  • Other: The second color to blend.

Returns:

The blended color.

ToBlendAsync

Blends the given color with another color asynchronously.

Parameters:

  • RGB: The first color to blend.
  • Other: The second color to blend.

Returns:

A task representing the asynchronous blending operation.

Private Methods

BlendToAvg

Blends two bytes by taking their average.

Parameters:

  • B1: The first byte to blend.
  • B2: The second byte to blend.

Returns:

The blended byte.


Method Description Parameters Return Value
ToBlend Returns a blended color value that is the average of two given colors. RGB (ColoriseStruct): The first color to blend. Other (ColoriseStruct): The second color to blend. ColoriseStruct: A blended color value that is the average of RGB and Other.
ToBlendAsync Returns a task that asynchronously computes a blended color value that is the average of two given colors. RGB (ColoriseStruct): The first color to blend. Other (ColoriseStruct): The second color to blend. Task<ColoriseStruct>: A task that returns a blended color value that is the average of RGB and Other.
Method (private) Description Parameters Return Value
BlendToAvg Computes the average of two byte values. B1 (byte): The first byte value to average. B2 (byte): The second byte value to average. byte: The average of B1 and B2, rounded to the nearest integer value.
Clone this wiki locally