---
schema_version: "1"
id: 17d5cf0e6b4718b2b802d5e9acd291463f5427d3f5d1a2f694960ed58fb8844b
title: DescribeIconResult Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_schema_describeiconresult.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_schema_describeiconresult.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 48f95aaf0d164bff5864f0280820243aa40958054e6217ef6d7eda8f50537e35
description: Contains icon metadata information for a tab.Returns the tab icon’s content type, such as image/png.Returns the tab icon’s height in pixels.Returns the tab’s icon theme.Returns the tab’s icon fully qualified URL.Returns the tab’s icon width in pixels.
---
# DescribeIconResult Class

Contains icon metadata information for a tab.

## Namespace

[Schema](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_Schema.htm "The Schema namespace provides classes and methods for schema metadata information.")

## Usage

The getIcons method of the Schema.DescribeTabResult class returns a list of Schema.DescribeIconResult objects that describe colors used in a tab.

The methods in the Schema.DescribeIconResult class can be called using their property counterparts. For each method starting with get, you can omit the get prefix and the ending parentheses () to call the property counterpart. For example, iconResultObj.url is equivalent to iconResultObj.getUrl().

## Example

This sample shows how to get the icon information in the Sales app for the first tab’s first icon.

// Get tab set describes for each app
List<Schema.DescribeTabSetResult> tabSetDesc = Schema.describeTabs();

// Iterate through each tab set
for(Schema.DescribeTabSetResult tsr : tabSetDesc) {            
    // Get tab info for the Sales app
    if (tsr.getLabel() == 'Sales') {
        // Get icon information for the first tab
        List<Schema.DescribeIconResult> iconDesc = tsr.getTabs()\[0\].getIcons();
        // Display the icon height and width of the first icon
        System.debug('Height: ' + iconDesc\[0\].getHeight());
        System.debug('Width: ' + iconDesc\[0\].getWidth());
    }            
}

// Example debug statement output
// DEBUG|Height: 32
// DEBUG|Width: 32

## DescribeIconResult Methods

The following are methods for DescribeIconResult. All are instance methods.

- **[getContentType()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_schema_describeiconresult.htm#apex_Schema_DescribeIconResult_getContentType)**  
    Returns the tab icon’s content type, such as image/png.
- **[getHeight()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_schema_describeiconresult.htm#apex_Schema_DescribeIconResult_getHeight)**  
    Returns the tab icon’s height in pixels.
- **[getTheme()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_schema_describeiconresult.htm#apex_Schema_DescribeIconResult_getTheme)**  
    Returns the tab’s icon theme.
- **[getUrl()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_schema_describeiconresult.htm#apex_Schema_DescribeIconResult_getUrl)**  
    Returns the tab’s icon fully qualified URL.
- **[getWidth()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_schema_describeiconresult.htm#apex_Schema_DescribeIconResult_getWidth)**  
    Returns the tab’s icon width in pixels.

### getContentType()

Returns the tab icon’s content type, such as image/png.

#### Signature

public String getContentType()

#### Return Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### getHeight()

Returns the tab icon’s height in pixels.

#### Signature

public Integer getHeight()

#### Return Value

Type: [Integer](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_integer.htm#apex_methods_system_integer "Contains methods for the Integer primitive data type.")

#### Usage

![Note](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/images/icon_note.png)

#### Note

If the icon content type is SVG, the icon won’t have a size and its height is zero.

### getTheme()

Returns the tab’s icon theme.

#### Signature

public String getTheme()

#### Return Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

Possible theme values include theme3, theme4, and custom.

- theme3 is the Salesforce theme introduced during Spring ‘10.
- theme4 is the Salesforce theme introduced in Winter ‘14 for the mobile touchscreen version of Salesforce.
- custom is the theme name associated with a custom icon.

### getUrl()

Returns the tab’s icon fully qualified URL.

#### Signature

public String getUrl()

#### Return Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### getWidth()

Returns the tab’s icon width in pixels.

#### Signature

public Integer getWidth()

#### Return Value

Type: [Integer](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_integer.htm#apex_methods_system_integer "Contains methods for the Integer primitive data type.")

#### Usage

![Note](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/images/icon_note.png)

#### Note

If the icon content type is SVG, the icon won’t have a size and its width is zero.