FourCornerGradient
public struct FourCornerGradientStores one colour per corner of a rectangle and supports bilinear colour evaluation. Coordinate convention: Y is up (bottom-left = (0,0), top-right = (1,1)).
Fields
Section titled “Fields”
TopLeft
Section titled “TopLeft”[Tooltip("Colour at the top-left corner of the area.")]public Color TopLeftReturns
UnityEngine.Color
TopRight
Section titled “TopRight”[Tooltip("Colour at the top-right corner of the area.")]public Color TopRightReturns
UnityEngine.Color
BottomLeft
Section titled “BottomLeft”[Tooltip("Colour at the bottom-left corner of the area.")]public Color BottomLeftReturns
UnityEngine.Color
BottomRight
Section titled “BottomRight”[Tooltip("Colour at the bottom-right corner of the area.")]public Color BottomRightReturns
UnityEngine.Color
Constructors
Section titled “Constructors”
FourCornerGradient(Color, Color, Color, Color)
Section titled “FourCornerGradient(Color, Color, Color, Color)”public FourCornerGradient(Color topLeft, Color topRight, Color bottomLeft, Color bottomRight)Creates a bilinear gradient by assigning a color to each corner in bottom-left-origin coordinates.
Parameters
| Name | Type |
|---|---|
topLeft |
UnityEngine.Color |
topRight |
UnityEngine.Color |
bottomLeft |
UnityEngine.Color |
bottomRight |
UnityEngine.Color |
Methods
Section titled “Methods”
Evaluate(float, float)
Section titled “Evaluate(float, float)”public Color Evaluate(float u, float v)Bilinearly interpolates the four corner colours at normalised Position (u, v). u = 0 is left, u = 1 is right; v = 0 is bottom, v = 1 is top.
Parameters
| Name | Type |
|---|---|
u |
System.Single |
v |
System.Single |
Returns
UnityEngine.Color
Properties
Section titled “Properties”
Default
Section titled “Default”public static FourCornerGradient Default { get; }Default: light grey top-left/bottom-right, slightly lighter top-right/bottom-left (diagonal gradient).
Returns
ChartGuru.FourCornerGradient
HorizonDawn
Section titled “HorizonDawn”public static FourCornerGradient HorizonDawn { get; }Calm blue-to-cyan dawn palette.
Returns
ChartGuru.FourCornerGradient
CoralSunset
Section titled “CoralSunset”public static FourCornerGradient CoralSunset { get; }Warm sunset: pink top shifting into amber/peach on the bottom.
Returns
ChartGuru.FourCornerGradient
MintLagoon
Section titled “MintLagoon”public static FourCornerGradient MintLagoon { get; }Cool lime-to-teal wash, nicely saturated for light themes.
Returns
ChartGuru.FourCornerGradient
NebulaVioletRose
Section titled “NebulaVioletRose”public static FourCornerGradient NebulaVioletRose { get; }Violet-to-magenta with a pink lower band; high contrast for dark themes.
Returns
ChartGuru.FourCornerGradient
TwilightEmber
Section titled “TwilightEmber”public static FourCornerGradient TwilightEmber { get; }Dark indigo fading into amber for a moody “dusk” look.
Returns
ChartGuru.FourCornerGradient
MidnightSlate
Section titled “MidnightSlate”public static FourCornerGradient MidnightSlate { get; }Polished dark-surface Preset (inky blues) for dark themes.
Returns
ChartGuru.FourCornerGradient