Skip to content
TradequixDocsOpen the terminal
OverviewStart here, search, progress
  • Introduction
  • Quickstart
  • How a script runs
  • Types and qualifiers
  • Operators, conditionals and loops
  • Functions and methods
  • Objects and enums
  • Arrays, matrices and maps
  • Strings and colours
  • Time and sessions
  • Bar states
  • Plotting
  • Inputs
  • Technical analysis
  • Drawings and tables
  • Multiple timeframes
  • Strategies
  • Alerts in scripts
  • Repainting
  • The Pine editor
  • Indicator settings
  • Coming from TradingView
  • The data
  • Publish and sell
  • Catalogue and community
  • Your dashboard and earnings
  • Errors and debugging
  • Limits
  • Coverage
  • Built-in catalogue
  • Cookbook
  • Write Pine with AI
  • FAQ
  • Glossary
  • Cheat sheet
  • Function reference
  • Will it run here?
  • Error index
Function reference

color

Named colours and functions to make your own. Transparency runs 0 (opaque) to 100 (invisible).

24 names from PineTS 0.11.1 · 4 with full entries

color.new

Verified
color.new(color, transp)

The same colour with transparency transp (0 to 100).

color.rgb

Supported
color.rgb(red, green, blue, transp)

A colour from 0 to 255 channels.

color.from_gradient

Verified
color.from_gradient(value, bottom_value, top_value, bottom_color, top_color)

A colour between two, by where value sits in a range.

Runnablecolor.from_gradient
1//@version=62indicator("color.from_gradient")3r = ta.rsi(close, 14)4plot(r, "RSI", color = color.from_gradient(r, 30, 70, color.red, color.teal), linewidth = 3)

color.r

Supported
color.r(color)  ·  color.g · color.b · color.t

Read one channel or the transparency.

Everything else in color

Also implemented. These follow TradingView’s Pine v6 reference for their arguments.

  • color.aquaSupportedImplemented. Arguments as in TradingView's Pine v6 reference.
  • color.bSupportedImplemented. Arguments as in TradingView's Pine v6 reference.
  • color.blackSupportedImplemented. Arguments as in TradingView's Pine v6 reference.
  • color.blueSupportedImplemented. Arguments as in TradingView's Pine v6 reference.
  • color.fuchsiaSupportedImplemented. Arguments as in TradingView's Pine v6 reference.
  • color.gSupportedImplemented. Arguments as in TradingView's Pine v6 reference.
  • color.grayVerifiedImplemented. Arguments as in TradingView's Pine v6 reference.
  • color.greenSupportedImplemented. Arguments as in TradingView's Pine v6 reference.
  • color.limeSupportedImplemented. Arguments as in TradingView's Pine v6 reference.
  • color.maroonSupportedImplemented. Arguments as in TradingView's Pine v6 reference.
  • color.navySupportedImplemented. Arguments as in TradingView's Pine v6 reference.
  • color.oliveSupportedImplemented. Arguments as in TradingView's Pine v6 reference.
  • color.orangeVerifiedImplemented. Arguments as in TradingView's Pine v6 reference.
  • color.purpleVerifiedImplemented. Arguments as in TradingView's Pine v6 reference.
  • color.redVerifiedImplemented. Arguments as in TradingView's Pine v6 reference.
  • color.silverSupportedImplemented. Arguments as in TradingView's Pine v6 reference.
  • color.tSupportedImplemented. Arguments as in TradingView's Pine v6 reference.
  • color.tealVerifiedImplemented. Arguments as in TradingView's Pine v6 reference.
  • color.whiteVerifiedImplemented. Arguments as in TradingView's Pine v6 reference.
  • color.yellowSupportedImplemented. Arguments as in TradingView's Pine v6 reference.

On this page

  • color.new
  • color.rgb
  • color.from_gradient
  • color.r
  • Everything else (20)