Legacy Documentation: Version 5.1
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Color.operator *

Switch to Manual
public static operator *(a: Color, b: Color): Color;

Parameters

Description

Multiplies two colors together. Each component is multiplied separately.

// white * gray = gray
var grayColor: Color = Color.gray * Color.white;

public static operator *(a: Color, b: float): Color;

Parameters

Description

Multiplies color a by the float b. Each color component is scaled separately.

// gray * 2 = White
var whiteColor: Color = Color.gray * 2;

public static operator *(b: float, a: Color): Color;

Parameters

Description

Multiplies color a by the float b. Each color component is scaled separately.

// 2 * gray = White
var whiteColor: Color = 2 * Color.gray;