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
//@chartscript 1
indicator("Coloured close", { overlay: true })
plot(close, { color: #ff980 })Fixed
//@chartscript 1
indicator("Coloured close", { overlay: true })
plot(close, { color: #FF9800 })#Related
- CS2008 — Expected expected but got got.