Skip to content
Algo Trade Analytics Docs

color.new() - Pine Script Function

Function color applies the specified transparency to the given color.

color.new(color, transp) → const color
NameTypeDescription
colorconst colorColor to apply transparency to.

Color with specified transparency.

  • 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.
//@version=6
indicator("color.new", overlay=true)
plot(close, color=color.new(color.red, 50))