Share via


SPTheme.GetThemeShadeByNameOrNull method (String, Boolean)

Gets a theme shade by name or null if no such theme shade exists in this theme

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

Syntax

'Declaration
Public Function GetThemeShadeByNameOrNull ( _
    colorName As String, _
    fixContrast As Boolean _
) As Nullable(Of Color)
'Usage
Dim instance As SPTheme
Dim colorName As String
Dim fixContrast As Boolean
Dim returnValue As Nullable(Of Color)

returnValue = instance.GetThemeShadeByNameOrNull(colorName, _
    fixContrast)
public Nullable<Color> GetThemeShadeByNameOrNull(
    string colorName,
    bool fixContrast
)

Parameters

  • 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.Nullable<Color>
A color representing the theme shade or null if no such theme shade exists in this theme.

Implements

ISPTheme.GetThemeShadeByNameOrNull(String, Boolean)

See also

Reference

SPTheme class

SPTheme members

GetThemeShadeByNameOrNull overload

Microsoft.SharePoint.Utilities namespace