---
schema_version: "1"
id: ebe15459f3c462df5e0a3c93f80427396b37e452631bcf266e749c3bb876119e
title: Themes
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/api-rest/guides/resources/resources-themes.md
canonical_url: https://developer.salesforce.com/docs/platform/api-rest/guide/resources-themes.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 9f5cfb411b0ecf5352dc967cb04790354019f4cad6daaca5e9df3cd8f18398d1
products:
  - REST API Developer Guide
  - Platform Developer Content
---

# Themes

Gets the list of icons and colors used by themes in the Salesforce application. Theme information is provided for objects in your organization that use icons and colors in the Salesforce UI. This resource is available in REST API version 29.0 and later.

The `If-Modified-Since` header can be used with this resource, with a date format of `EEE, dd MMM yyyy HH:mm:ss z`. When this header is used, if the object metadata has not changed since the provided date, a `304 Not Modified` status code is returned, with no response body.

## Syntax

**URI:** `/services/data/vXX.X/theme`

**Formats:** JSON, XML

**HTTP methods:** GET

**Authentication:** `Authorization: Bearer token`

**Request body:** None

**Request parameters:** None

**Response data**

An array of theme items. Each theme item contains the following fields:

|Name|Type|Description|
|----|----|-----------|
|`colors`|array of theme colors|Array of theme colors.|
|`icons`|array of theme icons|Array of theme icons.|
|`name`|string|Name of the object that the theme colors and icons are associated with.|

Each theme color contains the following fields:

|Name|Type|Description|
|----|----|-----------|
|`color`|string|The color described in Web color RGB format, for example, “00FF00”.|
|`context`|string|The color context, which determines whether the color is the main color (“primary”) for the object, or not.|
|`theme`|string|The associated theme. Possible values include: <ul><li>theme2—Theme used prior to Spring ’10, called the “Salesforce Classic 2005 user interface theme”</li><li>theme3—Theme introduced in Spring ’10, called the “Salesforce Classic 2010 user interface theme”</li><li>theme4—Theme introduced in Winter ’14 for the mobile touchscreen version of Salesforce, and in Winter ’16 for Lightning Experience</li><li>custom—Theme associated with a custom icon</li></ul>|

Each theme icon contains the following fields:

|Name|Type|Description|
|----|----|-----------|
|`contentType`|string|The icon’s content type, for example, “image/png.”|
|`height`|number|The icon’s height in pixels. If the icon content type is an SVG type, height and width values are not used.|
|`theme`|string|The associated theme. Possible values include: <ul><li>theme2—Theme used prior to Spring ’10, called the “Salesforce Classic 2005 user interface theme”</li><li>theme3—Theme introduced in Spring ’10, called the “Salesforce Classic 2010 user interface theme”</li><li>theme4—Theme introduced in Winter ’14 for the mobile touchscreen version of Salesforce, and in Winter ’16 for Lightning Experience</li><li>custom—Theme associated with a custom icon</li></ul>|
|`url`|string|The fully qualified URL for this icon.|
|`width`|number|The icon’s width in pixels. If the icon content type is an SVG type, height and width values are not used.|

## Example

```nolang
{ 
    "themeItems" : [ 
    { 
        "name" : "Merchandise__c", 
        "icons" : [ 
        { 
            "contentType" : "image/png", 
            "width" : 32, 
            "url" : "https://MyDomainName.my.salesforce.com/img/icon/computer32.png", 
            "height" : 32, 
            "theme" : "theme3" 
        }, 
        { 
            "contentType" : "image/png", 
            "width" : 16, 
            "url" : "https://MyDomainName.my.salesforce.com/img/icon/computer16.png", 
            "height" : 16, 
            "theme" : "theme3" 
        } ], 
        "colors" : [ 
        { 
            "context" : "primary", 
            "color" : "6666CC", 
            "theme" : "theme3" 
        }, 
        { 
            "context" : "primary", 
            "color" : "66895F", 
            "theme" : "theme4" 
        }, 
    ...
    }
...
}

```

