The _color() method.
This method serves two distinct functions. Firstly, it acts as a method that returns a color value based on constants. Secondly, it functions as a method of the gradient object, allowing users to obtain the gradient color value by providing it with a number.
_color()
Get custom preset color.
- Name
this
- Type
- string
- Description
A preset constant. Choices are: aqua_bright, aqua_dark, aqua_light, aqua_medium, black_bright, black_dark, black_light, black_medium, blue_bright, blue_dark, blue_light, blue_medium, gray_bright, gray_dark, gray_light, gray_medium, green_bright, green_dark, green_light, green_medium, orange_bright, orange_dark, orange_light, orange_medium, pink_bright, pink_dark, pink_light, pink_medium, purple_bright, purple_dark, purple_light, purple_medium, red_bright, red_dark, red_light, red_medium, white_bright, white_dark, white_light, white_medium, yellow_bright, yellow_dark, yellow_light, yellow_medium.
- Name
transp
- Type
- float
- Description
A transparency value. Optional. The default is 0.
- Name
returns
- Type
- color
- Description
A custom preset color value based on constant name.
_color()
Get the gradient color for given number.
- Name
this
- Type
- _gradient
- Description
A _gradient object.
- Name
num
- Type
- float
- Description
A number value. Must be in range of the minimum and maximum value of the _gradient object.
- Name
returns
- Type
- color
- Description
A custom preset color value based on constant name.