Skip to content

FourCornerGradient

StructChartGuruChartGuru
[Serializable]
public struct FourCornerGradient

Stores 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)).

[Tooltip("Colour at the top-left corner of the area.")]
public Color TopLeft

No description is available for this member.

Returns

UnityEngine.Color — No return description is available.

[Tooltip("Colour at the top-right corner of the area.")]
public Color TopRight

No description is available for this member.

Returns

UnityEngine.Color — No return description is available.

[Tooltip("Colour at the bottom-left corner of the area.")]
public Color BottomLeft

No description is available for this member.

Returns

UnityEngine.Color — No return description is available.

[Tooltip("Colour at the bottom-right corner of the area.")]
public Color BottomRight

No description is available for this member.

Returns

UnityEngine.Color — No return description is available.

FourCornerGradient(Color, Color, Color, Color)

Section titled “FourCornerGradient(Color, Color, Color, Color)”
public FourCornerGradient(Color topLeft, Color topRight, Color bottomLeft, Color bottomRight)

No description is available for this member.

Parameters

Name Type Description
topLeft UnityEngine.Color
topRight UnityEngine.Color
bottomLeft UnityEngine.Color
bottomRight UnityEngine.Color

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 Description
u System.Single
v System.Single

Returns

UnityEngine.Color — No return description is available.

public static FourCornerGradient Default { get; }

Default: light grey top-left/bottom-right, slightly lighter top-right/bottom-left (diagonal gradient).

Returns

ChartGuru.FourCornerGradient — No return description is available.

public static FourCornerGradient HorizonDawn { get; }

Calm blue-to-cyan dawn palette.

Returns

ChartGuru.FourCornerGradient — No return description is available.

public static FourCornerGradient CoralSunset { get; }

Warm sunset: pink top shifting into amber/peach on the bottom.

Returns

ChartGuru.FourCornerGradient — No return description is available.

public static FourCornerGradient MintLagoon { get; }

Cool lime-to-teal wash, nicely saturated for light themes.

Returns

ChartGuru.FourCornerGradient — No return description is available.

public static FourCornerGradient NebulaVioletRose { get; }

Violet-to-magenta with a pink lower band; high contrast for dark themes.

Returns

ChartGuru.FourCornerGradient — No return description is available.

public static FourCornerGradient TwilightEmber { get; }

Dark indigo fading into amber for a moody “dusk” look.

Returns

ChartGuru.FourCornerGradient — No return description is available.

public static FourCornerGradient MidnightSlate { get; }

Polished dark-surface Preset (inky blues) for dark themes.

Returns

ChartGuru.FourCornerGradient — No return description is available.