ColorRange


Declaration

[Serializable]
public struct ColorRange : INumberRange<Color>, IRange<Color>

Description

A range of Color values.

Static Properties

blackShorthand for writing ColorRange(Color.black, Color.black).
whiteShorthand for writing ColorRange(Color.white, Color.white).
blackToWhiteShorthand for writing ColorRange(Color.black, Color.white).
whiteToBlackShorthand for writing ColorRange(Color.white, Color.black).
fadeInShorthand for writing ColorRange(Color(0,0,0,0), Color(0,0,0,1)).
fadeOutShorthand for writing ColorRange(Color(0,0,0,1), Color(0,0,0,0)).
transparentShorthand for writing ColorRange(Color(0,0,0,0), Color(0,0,0,0)).

Properties

minThe lower bound of the range.
maxThe upper bound of the range.
DeltaThe difference between the maximum and minimum values (Read only).
MedianThe median value of the range (Read only).

Constructors

ColorRangeCreates a new range with the specified values.

Methods

RandomReturns a random value in the range.
IncludesChecks if a value is in the range.
ClampClamps a value to the range.
LerpLinearly interpolates between the range by t.
InverseLerpCalculates the linear parameter t that produces the interpolant value within the range.