Styles¶
Wickly ships with six built-in styles and a make_style() helper for
creating custom palettes — mirroring the mplfinance styling API.
Built-in styles¶
Use any of the following names with the style parameter of
wickly.plot():
Style |
Up colour |
Down colour |
Background |
Notes |
|---|---|---|---|---|
|
🟢 |
🔴 |
|
Teal / red on white |
|
🟢 |
🔴 |
|
Classic green / maroon |
|
|
🔵 |
⚫ |
Dark-mode blue theme |
|
🟢 |
🔴 |
|
Yahoo Finance colours |
|
|
|
|
Black-and-white |
|
🟢 |
🔴 |
⚫ |
Dark-mode green / red |
Listing all available styles¶
import wickly
print(wickly.available_styles())
# ['default', 'charles', 'mike', 'yahoo', 'classic', 'nightclouds']
Using a style¶
Pass the style name as a string:
wickly.plot(df, type="candle", style="nightclouds")
Creating a custom style¶
Use wickly.make_style() to derive a new style from any built-in
base:
my_style = wickly.make_style(
base_mpf_style="nightclouds",
up_color="#00ff00",
down_color="#ff0000",
bg_color="#111111",
grid_color="#222222",
mavcolors=["cyan", "magenta", "yellow"],
)
wickly.plot(df, style=my_style)
Style dictionary keys¶
Every style is a plain dict with the following keys:
Key |
Description |
|---|---|
|
Candle body fill when close ≥ open |
|
Candle body fill when close < open |
|
Candle border colour (up) |
|
Candle border colour (down) |
|
Wick colour (up) |
|
Wick colour (down) |
|
Volume bar colour (up) |
|
Volume bar colour (down) |
|
Chart background colour |
|
Grid line colour |
|
Axis label / title colour |
|
Overall opacity (0.0 – 1.0) |
|
List of colours for moving-average lines |
You can also pass a raw dict directly to the style parameter of
plot() — missing keys are filled from the "default" style.