## gs-key-colors gs-key-colors — Helper functions for calculating key colors |

## Functions

GArray * | gs_calculate_key_colors ()

## Description

Key colors are RGB colors which represent an app, and they are derived from the app’s icon, or manually specified as an override.

Use `gs_calculate_key_colors()` to calculate the key colors from an app’s icon.

## Functions

### gs_calculate_key_colors ()

    GArray *
    gs_calculate_key_colors (GdkPixbuf *pixbuf);

Calculate the set of key colors present in `pixbuf` . These are the colors which stand out the most, and they are subjective. This function does not guarantee to return perfect results, but should return workable results for most icons.

`pixbuf` will be scaled down to 32×32 pixels, so if it can be provided at that resolution by the caller, this function will return faster.

#### Parameters

pixbuf | an app icon to calculate key colors from |

#### Returns

key colors for `pixbuf` .

[transfer full][element-type GdkRGBA]

Since: 40