Skip to content
ChartDeck ChartScript docs Account Open the terminal

CS1024

error A color literal is #RRGGBB or #RRGGBBAA.

#What it means

A colour written with # must have exactly 6 hexadecimal digits (#RRGGBB) or 8 (#RRGGBBAA, where AA is the opacity).

#Typical cause

  • A digit is missing or extra, as in #12345.
  • A letter outside 0-9 and A-F, such as #12GG56.
  • A 3-digit shorthand (#fff), which ChartScript does not accept.

#How to fix it

Write all 6 (or 8) digits, or use a named colour such as color.orange. See Colours.

#Example

ChartScriptError: CS1024
//@chartscript 1
indicator("Coloured close", { overlay: true })
plot(close, { color: #ff980 })

Fixed

ChartScriptOpen in editor
//@chartscript 1
indicator("Coloured close", { overlay: true })
plot(close, { color: #FF9800 })
  • CS2008 — Expected expected but got got.

The ChartScript documentation is in English for now; translations will follow.