none
Excel colors: getting rgb color definition following theme and tint values ? RRS feed

  • Question

  • Hello,

    I am writing a python application to reproduce an excel table in SVG.

    Is there a way to get all correspondances between rgb color, and (theme-tint) values currently defined in excel ? for example: '235,241,222' -> (6, 0.8): 

    I am aware about this https://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.foregroundcolor.aspx,

    but I would like to avoid calculation and store these values directly.

    Thanks

    Monday, May 29, 2017 2:15 PM

All replies

  • Hello,

    This forum is for development issues related to Excel object model. Office object model doesn't provide any method or properties to get all correspondences between rgb color and theme-tint.

    I think you need to write your logic to calculate.

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, May 30, 2017 8:42 AM
    Moderator
  • Which colours? A theme has 10 colours, then 5 %-tints for each. The %-tints are not at fixed %s but according to an algorithm which depend on the source colour (can be calculated). So 60 colours for a given theme, or 72 if you include the 2 hyperlink colors (not shown on the Excel palette)

    The default Office theme differs in successive versions. Dozens of alternate built-in themes can easily be applied, also different in successive versions. Any built-in theme can be customised, or third party custom themes installed.

    Friday, June 2, 2017 9:13 AM
    Moderator