Get the Hex of theme color variations

Posted by: yijia on 12 November 2025, 12:47 am EST

    • Post Options:
    • Link

    Posted 12 November 2025, 12:47 am EST

    Hi there, wondering if it’s possible to get the exact hex (or ability to replicate) the theme color tinting / variations from the color fill dropdown?

    I notice it’s different for Background1/2 and Text 1/2 compared to the developer list below and what I see when I use the SpreadJS Color Fill dropdown

    https://developer.mescius.com/spreadjs/docs/features/styletheme/themes

  • Posted 12 November 2025, 4:49 am EST - Updated 12 November 2025, 4:54 am EST

    Hi,

    As per my understanding, you’d like to get the exact hex code of the theme color applied in the sheet.

    You can use the getColor method to retrieve the hex code of a specific theme color:

    spread.getActiveSheet().currentTheme().getColor('Accent 2 -25');

    To get the color applied to a specific cell, you can use the getStyle method:

    spread.getActiveSheet().getStyle(rowIndex, colIndex);

    Please refer to the attached GIF and this demo for more details:

    https://developer.mescius.com/spreadjs/demos/features/theme/document-theme/purejs

    Gif:

    Regards,

    Priyam

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels