Try our affiliated browser extension - redirect to BreezeWiki automatically!

Color3

The Color3 data type is composed of red, green and blue components, each representing a number between 0 and 1 (although not limited to this range). Color3 values can also be constructed using different types of values, as described below. It is used in many classes such as BasePart and GUI classes.

Constructors

  • Color3.new(number r, number g, number b)
    • All numbers used in this function must be between 0–1.
  • Color3.fromRGB(number r, number g, number b)
    • All numbers used in this function must be between 0–255.
  • Color3.fromHSV(number h, number s, number v)
    • All numbers used in this function must be between 0–1.
    • This function creates a Color3 with the given hue, saturation, and value.

Properties

  • number Color3.r
    • The red value of the Color3.
  • number Color3.g
    • The green value of the Color3
  • number Color3.b
    • The blue value of the Color3

Functions

  • Color3 Color3:lerp( Color3 color, number alpha )
    • Returns a Color3 interpolated between two other Color3 objects. 
    • The alpha value must be a number from 0–1.
  • numbernumbernumber Color3.toHSV( Color3 color )
    • Returns the hue, saturation, and value of a Color3.

Referenced by


External links