Skip to content
Algo Trade Analytics Docs
Pine library page — review pending. This page is preserved for compatibility but is not part of the reviewed search index. Check the official Pine Script v6 reference before relying on its explanation, signature, or example.

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))