rgb(r: number , g: number , b: number ): Color
Create a color from RGB values (0 - 255).
paramr- The red value.
paramg- The green value.
paramb- The blue value.
// update the color of the sky to light blue
sky.color = rgb(0, 128, 255)
returnsThe color.
sincev2000.0
groupMath
rgb(hex: string ): Color
Create a color from hex string.
paramhex- The hex string.
sky.color = rgb("#ef6360")
returnsThe color.
sincev2000.0
groupMath
rgb(cssColor: CSSColorKeywords ): Color
Create a color from CSS keyword.
paramcssColor- The CSS keyword.
sea.color = rgb("slateblue");
returnsThe color.
sincev3001.0.10
experimentalThis feature is in experimental phase, it will be fully released in v3001.1.0
rgb(): Color
Same as rgb(255, 255, 255).