Documentation Index
Fetch the complete documentation index at: https://docs.darvas.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Colors in the Darvas indicator API are expressed as 8-character hex strings in#RRGGBBAA format, where the last two characters are the alpha channel (FF = fully opaque, 00 = fully transparent). The color namespace provides named constants and construction helpers.
Constructing colors
Create a color from a hex string with optional transparency (0-100, where 100 = fully transparent).
For the full list of
color.* functions including color.rgb, color.from_gradient, color.r, color.g, color.b, and color.t, see the custom indicator spec.Named color constants
The runtime exposes 24 named colors via thecolor namespace:
| Constant | Hex |
|---|---|
color.red | #ef4444FF |
color.green | #22c55eFF |
color.blue | #3b82f6FF |
color.yellow | #eab308FF |
color.orange | #f97316FF |
color.purple | #a78bfaFF |
color.white | #FFFFFFFF |
color.black | #000000FF |
color.gray | #6b7280FF |
color.silver | #9ca3afFF |
color.lime | #84cc16FF |
color.teal | #14b8a6FF |
color.cyan | #06b6d4FF |
color.navy | #1e40afFF |
color.maroon | #9f1239FF |
color.fuchsia | #d946efFF |
color.pink | #ec4899FF |
color.rose | #f43f5eFF |
color.amber | #f59e0bFF |
color.emerald | #10b981FF |
color.sky | #0ea5e9FF |
color.violet | #8b5cf6FF |
color.indigo | #6366f1FF |
color.slate | #64748bFF |
Dynamic coloring example
Transparency with color.new
Related pages
Plot basics
color option for plot series.
hline, fill, bgcolor
bgcolor and barcolor use the same color format.
Line entity
Entity colors also use #RRGGBBAA format.