On Thu, 15 Jan 2026, Enrico Schumann writes:

> On Wed, 14 Jan 2026, Andre Luiz Tietbohl Ramos writes:
>
>> Hello,
>>
>> Is there a way to customize quantmod theme colors?  This great library
>> works fine however I rather change its color theme.  So far, I have been
>> able to use both white and black themes.
>> I tried to use the chartSeries theme command described below to no avail.
>> I tried even without a theme name, e.g. white or black. An example is below,
>>
>> stock.plot <- chartSeries(stock.time_interval,  ## ativo,
>>                           name = stock.name,
>>                           type = "candlestick",
>>                           subset='2025-07::2026-01',
>>                           theme = chartTheme("white", up.col='darkgreen',
>> dn.col='darkred',
>>                                              bg.col='gray',
>> selection.color='gray'),
>>                           TA = NULL
>>                           )
>>
>> Could anyone help, please?
>>
>> TIA,
>>
>> --
>> Andre Luiz Tietbohl Ramos, PhD
>>
>
> With quantmod 0.4.28 and R 4.5.2, and ESS (but on GNU/Linux),
> I can change colours, e. g.
>
>     library("quantmod")
>     getSymbols("AAPL")
>     
>     chartSeries(
>         AAPL,
>         type = "candlestick",
>         subset = '2025-07::2026-01',
>         theme = chartTheme("black",
>                            up.col = "blue"))
>
> gives me "blue" up-bars.  The same example also works
> when I run it from a terminal.
>
> Could this be some Apple-specific thing?

What happens when you send the graphic to a PDF, e.g.:

    pdf("some-file-name.pdf")
    library("quantmod")
    getSymbols("AAPL")
    
    chartSeries(
        AAPL,
        type = "candlestick",
        subset = '2025-07::2026-01',
        theme = chartTheme("black",
                           up.col = "blue"))
    dev.off()

Does the colour show up?


-- 
Enrico Schumann
Lucerne, Switzerland
https://enricoschumann.net

_______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.

Reply via email to