Share via


SPThemeInfo.GetThemeShadeColorByName method

Gets a theme shade by name.

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

Syntax

'Declaration
Public Function GetThemeShadeColorByName ( _
    name As String _
) As Nullable(Of Color)
'Usage
Dim instance As SPThemeInfo
Dim name As String
Dim returnValue As Nullable(Of Color)

returnValue = instance.GetThemeShadeColorByName(name)
public Nullable<Color> GetThemeShadeColorByName(
    string name
)

Parameters

  • name
    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.

Return value

Type: System.Nullable<Color>
A color representing the theme shade or a null reference (Nothing in Visual Basic) if no such theme shade exists.

See also

Reference

SPThemeInfo class

SPThemeInfo members

Microsoft.SharePoint namespace