CustomColor(code)
Source¶
A color of a chart written as # followed by its red, green and blue parts in hexadecimal.
Accepted wherever a Color is, for the colors the named ones do not cover.
Added in version 0.1.0
Parameters:
-
code(str)The color, such as
"#ff8800"for orange, in lowercase or uppercase.
Raises:
-
InvalidTypeErrorWhen a setting is not of the type its annotation names.
-
InvalidColorErrorWhen the code is not
#followed by six hexadecimal digits.
Examples:
import numdaplot as ndp
prices = ndp.Array.from_list([12.0, 15.5, 14.0, 17.0])
chart = ndp.LineChart(colors=[ndp.CustomColor("#ff8800")])
plot = ndp.Plot.line(prices, chart)
plot.show()