Class Palette
Definition
- Namespace:
- Tizen.NUI
- Assembly:
- Tizen.NUI.dll
- API Level:
- 9
A helper class to extract prominent colors from an image.
A number of colors with different profiles are extracted from the image: Vibrant, Vibrant Dark, Vibrant Light, Muted, Muted Dark, Muted Light
These can be retrieved from the appropriate getter method.
C#Copypublic sealed class Palette : object
- Inheritance
-
Palette
Methods
Declaration
C#Copypublic static Palette Generate(PixelBuffer pixelBuffer)
Parameters
Type | Name | Description |
---|---|---|
PixelBuffer | pixelBuffer | A Target image's pixelBuffer. |
Returns
Type | Description |
---|---|
Palette | the palette instance. |
API Level: 9
Generate(PixelBuffer, Rectangle)
Generate a Palette synchronously using pixelBuffer as source. And set a region of the pixelBuffer to be used exclusively when calculating the palette.
Declaration
C#Copypublic static Palette Generate(PixelBuffer pixelBuffer, Rectangle region)
Parameters
Type | Name | Description |
---|---|---|
PixelBuffer | pixelBuffer | A Target image's pixelBuffer. |
Rectangle | region | A rectangle used for region. |
Returns
Type | Description |
---|---|
Palette | the palette instance. |
API Level: 9
Declaration
C#Copypublic static Task<Palette> GenerateAsync(PixelBuffer pixelBuffer)
Parameters
Type | Name | Description |
---|---|---|
PixelBuffer | pixelBuffer | A Target image's pixelBuffer. |
Returns
Type | Description |
---|---|
Task<Palette> | A task that represents the asynchronous pixelBuffer generate operation. |
API Level: 9
GenerateAsync(PixelBuffer, Rectangle)
Generate a Palette asynchronously using pixelBuffer as source. And set a region of the pixelBuffer to be used exclusively when calculating the palette.
Declaration
C#Copypublic static Task<Palette> GenerateAsync(PixelBuffer pixelBuffer, Rectangle region)
Parameters
Type | Name | Description |
---|---|---|
PixelBuffer | pixelBuffer | A Target image's pixelBuffer. |
Rectangle | region | A rectangle used for region. |
Returns
Type | Description |
---|---|
Task<Palette> | A task that represents the asynchronous pixelBuffer generate operation. |
API Level: 9
Declaration
C#Copypublic Palette.Swatch GetDarkMutedSwatch()
Returns
Type | Description |
---|---|
Palette.Swatch | The swatch instance |
API Level: 9
GetDarkVibrantSwatch()
Returns a dark and vibrant swatch from the palette. Might be null.
Declaration
C#Copypublic Palette.Swatch GetDarkVibrantSwatch()
Returns
Type | Description |
---|---|
Palette.Swatch | The swatch instance |
API Level: 9
GetDominantSwatch()
Returns the dominant swatch from the palette. The dominant swatch is defined as the swatch with the greatest population (frequency) within the palette.
Declaration
C#Copypublic Palette.Swatch GetDominantSwatch()
Returns
Type | Description |
---|---|
Palette.Swatch | The swatch instance |
API Level: 9
Declaration
C#Copypublic Palette.Swatch GetLightMutedSwatch()
Returns
Type | Description |
---|---|
Palette.Swatch | The swatch instance |
API Level: 9
GetLightVibrantSwatch()
Returns a light and vibrant swatch from the palette. Might be null.
Declaration
C#Copypublic Palette.Swatch GetLightVibrantSwatch()
Returns
Type | Description |
---|---|
Palette.Swatch | The swatch instance |
API Level: 9
Declaration
C#Copypublic Palette.Swatch GetMutedSwatch()
Returns
Type | Description |
---|---|
Palette.Swatch | The swatch instance |
API Level: 9
Declaration
C#Copypublic IReadOnlyCollection<Palette.Swatch> GetSwatches()
Returns
Type | Description |
---|---|
IReadOnlyCollection<Palette.Swatch> | The swatch list |
API Level: 9
Declaration
C#Copypublic Palette.Swatch GetVibrantSwatch()
Returns
Type | Description |
---|---|
Palette.Swatch | The swatch instance |