Skip to content
Algo Trade Analytics Docs

color.rgb() - Pine Script Function

Creates a new color with transparency using the RGB color model.

color.rgb(red, green, blue, transp) → const color
NameTypeDescription
redconst int/floatRed color component. Possible values are from 0 to 255.

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.rgb", overlay=true)
plot(close, color=color.rgb(255, 0, 0, 50))