Class ColorExtensions
Extension class for Color
- Inheritance
-
Color
Extensions
Methods
ToColorSpace(Color3, ColorSpace)
Converts the color in gamma space to the specified Color
Parameters
color
Color3The color.
colorSpace
ColorSpace The color space.
Returns
- Color3
The color converted to the specified color space.
ToColorSpace(Color3, ColorSpace, ColorSpace)
Converts the color from a particualr color space to the specified Color
public static Color3 ToColorSpace(this Color3 color, ColorSpace sourceColorSpace, ColorSpace colorSpace)
Parameters
color
Color3The color.
sourceColorSpace
ColorSpace The color space of this instance.
colorSpace
ColorSpace The color space.
Returns
- Color3
The color converted to the specified color space.
ToColorSpace(Color4, ColorSpace)
Converts the color in gamma space to the specified Color
Parameters
color
Color4The color.
colorSpace
ColorSpace The color space.
Returns
- Color4
The color converted to the specified color space.
ToColorSpace(Color4, ColorSpace, ColorSpace)
Converts the color from a particualr color space to the specified Color
public static Color4 ToColorSpace(this Color4 color, ColorSpace sourceColorSpace, ColorSpace colorSpace)
Parameters
color
Color4The color.
sourceColorSpace
ColorSpace The color space of this instance.
colorSpace
ColorSpace The color space.
Returns
- Color4
The color converted to the specified color space.
WithAlpha(Color, byte)
Create a copy of the color with the provided alpha value.
Parameters
Returns
- Color
The color with the provided alpha value