Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

OfficeTheme

OfficeIMO

Namespace
OfficeIMO
Assembly
OfficeIMO.Core
Source revision
e163ccb36643 with working tree changes
Modifiers
sealed

An immutable visual identity shared by document formats. Loading a document does not apply a theme.

Inheritance

  • object
  • OfficeTheme

Usage

Explore 19 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters 1

Constructors

OfficeTheme 2 overloads
public OfficeTheme(string name, OfficeThemePalette palette, OfficeThemeFonts fonts, OfficeThemeTypeScale typeScale, OfficeThemeTableStyle tableStyle, OfficeThemeChartStyle chartStyle, OfficeThemeSpacing spacing) #

Creates a theme from immutable palette, typography, table, chart and spacing components. Text style, surfaces, page margins and footer take the OfficeTheme.Modern treatment, with tints derived from palette.

Parameters

name string required
palette OfficeIMO.OfficeThemePalette required
fonts OfficeIMO.OfficeThemeFonts required
typeScale OfficeIMO.OfficeThemeTypeScale required
tableStyle OfficeIMO.OfficeThemeTableStyle required
chartStyle OfficeIMO.OfficeThemeChartStyle required
spacing OfficeIMO.OfficeThemeSpacing required
public OfficeTheme(string name, OfficeThemePalette palette, OfficeThemeFonts fonts, OfficeThemeTypeScale typeScale, OfficeThemeTableStyle tableStyle, OfficeThemeChartStyle chartStyle, OfficeThemeSpacing spacing, OfficeThemeTextStyle textStyle, OfficeThemeSurfaces surfaces, OfficeThemePage page, OfficeThemeFooter footer) #

Creates a theme from every immutable component.

Parameters

name string required
palette OfficeIMO.OfficeThemePalette required
fonts OfficeIMO.OfficeThemeFonts required
typeScale OfficeIMO.OfficeThemeTypeScale required
tableStyle OfficeIMO.OfficeThemeTableStyle required
chartStyle OfficeIMO.OfficeThemeChartStyle required
spacing OfficeIMO.OfficeThemeSpacing required
textStyle OfficeIMO.OfficeThemeTextStyle required
surfaces OfficeIMO.OfficeThemeSurfaces required
page OfficeIMO.OfficeThemePage required
footer OfficeIMO.OfficeThemeFooter required

Methods

public static OfficeTheme FromDocument(string path) #

Reads the colour scheme and Latin heading/body fonts from a Word, Excel or PowerPoint package.

Parameters

path string required
Path to the document or template.

Returns

OfficeTheme An immutable theme suitable for creating documents in any supported format.
public OfficeTheme WithChartStyle(OfficeThemeChartStyle chartStyle) #

Returns a theme with replacement chart styling.

Parameters

chartStyle OfficeIMO.OfficeThemeChartStyle required
public OfficeTheme WithFonts(OfficeThemeFonts fonts) #

Returns a theme with replacement heading and body fonts.

Parameters

fonts OfficeIMO.OfficeThemeFonts required
public OfficeTheme WithFooter(OfficeThemeFooter footer) #

Returns a theme with replacement footer styling.

Parameters

footer OfficeIMO.OfficeThemeFooter required
public OfficeTheme WithName(string name) #

Returns a theme with a new name.

Parameters

name string required
public OfficeTheme WithPage(OfficeThemePage page) #

Returns a theme with replacement page margins.

Parameters

page OfficeIMO.OfficeThemePage required
public OfficeTheme WithPalette(OfficeThemePalette palette) #

Returns a theme with a replacement palette.

Parameters

palette OfficeIMO.OfficeThemePalette required
public OfficeTheme WithSpacing(OfficeThemeSpacing spacing) #

Returns a theme with replacement spacing.

Parameters

spacing OfficeIMO.OfficeThemeSpacing required
public OfficeTheme WithSurfaces(OfficeThemeSurfaces surfaces) #

Returns a theme with replacement surface colours.

Parameters

surfaces OfficeIMO.OfficeThemeSurfaces required
public OfficeTheme WithTableStyle(OfficeThemeTableStyle tableStyle) #

Returns a theme with replacement table styling.

Parameters

tableStyle OfficeIMO.OfficeThemeTableStyle required
public OfficeTheme WithTextStyle(OfficeThemeTextStyle textStyle) #

Returns a theme with replacement text style.

Parameters

textStyle OfficeIMO.OfficeThemeTextStyle required
public OfficeTheme WithTypeScale(OfficeThemeTypeScale typeScale) #

Returns a theme with replacement type sizes.

Parameters

typeScale OfficeIMO.OfficeThemeTypeScale required

Properties

public static OfficeTheme Modern { get; } #

Gets a clean sans-serif theme with a cobalt accent and airy, tinted-header tables (the default).

public static OfficeTheme Classic { get; } #

Gets a traditional serif document theme with navy headings and an ochre title rule.

public static OfficeTheme Minimal { get; } #

Gets a restrained theme without fills whose fonts have metric-compatible open substitutes, so layout matches across office suites.

public static OfficeTheme Boardroom { get; } #

Gets a formal theme with regular-weight serif headings, a gold rule and generous margins.

public static OfficeTheme Dark { get; } #

Gets a screen theme with light text on a dark background; Word and Excel keep a light page.

public string Name { get; } #

Gets the theme name.

public OfficeThemePalette Palette { get; } #

Gets literal palette colors.

public OfficeThemeFonts Fonts { get; } #

Gets heading and body fonts.

public OfficeThemeTypeScale TypeScale { get; } #

Gets document type sizes.

public OfficeThemeTableStyle TableStyle { get; } #

Gets table styling tokens.

public OfficeThemeChartStyle ChartStyle { get; } #

Gets chart styling tokens.

public OfficeThemeSpacing Spacing { get; } #

Gets paragraph, list and slide spacing.

public OfficeThemeTextStyle TextStyle { get; } #

Gets line spacing, title, heading and link colours and heading spacing.

public OfficeThemeSurfaces Surfaces { get; } #

Gets panel, hairline, accent-tint and status fills.

public OfficeThemePage Page { get; } #

Gets page margins for Word and PDF output.

public bool IsDark { get; } #

Gets whether the theme paints a dark background (used by screen formats; Word and Excel keep a light page).

public static OfficeTheme Default { get; } #

Gets the default visual identity, OfficeTheme.Modern.