FANDOM


The basic Color3 data type is a tuple of three numbers between 0 and 1 representing a color with red, blue and green components. Color3 data can also be constructed using different types of values, as described below. It is used in many objects, including ExplorerImageIndex 1PartsExplorerImageIndex 47ScreenGui objects, ExplorerImageIndex 0BodyColors instances, and more.

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.


Community content is available under CC-BY-SA unless otherwise noted.