color.new() - Pine Script Function
color.new()
Section titled “color.new()”Overview
Section titled “Overview”Function color applies the specified transparency to the given color.
Syntax
Section titled “Syntax”color.new(color, transp) → const colorParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| color | const color | Color to apply transparency to. |
Returns
Section titled “Returns”Color with specified transparency.
Remarks
Section titled “Remarks”- Using arguments that are not constants (e.g., ‘simple’, ‘input’ or ‘series’) will have an impact on the colors displayed in the script’s “Settings/Style” tab. See the User Manual for more information.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”//@version=6indicator("color.new", overlay=true)plot(close, color=color.new(color.red, 50))