Share via


ThmxTheme.GetThemeShadeByName method (String, Boolean)

Gets a theme shade by name

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Function GetThemeShadeByName ( _
    themeColorName As String, _
    fixContrast As Boolean _
) As Color
'Usage
Dim instance As ThmxTheme
Dim themeColorName As String
Dim fixContrast As Boolean
Dim returnValue As Color

returnValue = instance.GetThemeShadeByName(themeColorName, _
    fixContrast)
public Color GetThemeShadeByName(
    string themeColorName,
    bool fixContrast
)

Parameters

  • themeColorName
    Type: System.String

    A theme shade name string of the format: ColorName[-ShadeName] where valid ShadeNames are: Darkest, Darker, Medium, Lighter, Lightest (and no shade to get the color's default shade).

  • fixContrast
    Type: System.Boolean

    Whether to edit the contrast of the color based on whether the theme as a whole is inverted.

Return value

Type: System.Drawing.Color
A color representing the theme shade.

See also

Reference

ThmxTheme class

ThmxTheme members

GetThemeShadeByName overload

Microsoft.SharePoint.Utilities namespace