Class Palette.Swatch

Definition

Namespace:
Tizen.NUI
Assembly:
Tizen.NUI.dll
API Level:
9

Represents a color swatch generated from an image's palette. The RGB color can be retrieved calling getRgb()

C#
Copy
public sealed class Swatch : object
Inheritance
Palette.Swatch

Constructors

View Source

Swatch(Int32, Int32)

Declaration
C#
Copy
public Swatch(int rgbcolorInt, int populationOfSwatch)
Parameters
Type Name Description
Int32 rgbcolorInt
Int32 populationOfSwatch
View Source

Swatch(Int32, Int32, Int32, Int32)

Declaration
C#
Copy
public Swatch(int redValueOfSwatch, int greenValueOfSwatch, int blueValueOfSwatch, int populationOfSwatch)
Parameters
Type Name Description
Int32 redValueOfSwatch
Int32 greenValueOfSwatch
Int32 blueValueOfSwatch
Int32 populationOfSwatch

Methods

View Source

GetBodyTextColor()

Returns an appropriate color to use for any 'body' text which is displayed over this Palette.Swatchs color. This color is guaranteed to have sufficient contrast.

Declaration
C#
Copy
public Color GetBodyTextColor()
Returns
Type Description
Color

A Tizen.NUI.Color value.

API Level: 9
View Source

GetHsl()

Return this swatch's hsl values. hsv[0] is Hue [0 .. 360) hsv[1] is Saturation [0...1] hsv[2] is Lightness [0...1]

Declaration
C#
Copy
public float[] GetHsl()
Returns
Type Description
Single[]

A float array value.

API Level: 9
View Source

GetPopulation()

Returns the number of pixels detected in this swatch.

Declaration
C#
Copy
public int GetPopulation()
Returns
Type Description
Int32

A number of pixels value.

API Level: 9
View Source

GetRgb()

return this swatch's RGB color value

Declaration
C#
Copy
public Color GetRgb()
Returns
Type Description
Color

A Tizen.NUI.Color value.

API Level: 9
View Source

GetTitleTextColor()

Returns an appropriate color to use for any 'title' text which is displayed over this Palette.Swatchs color. This color is guaranteed to have sufficient contrast.

Declaration
C#
Copy
public Color GetTitleTextColor()
Returns
Type Description
Color

A Tizen.NUI.Color value.

API Level: 9
View Source

ToString()

Declaration
C#
Copy
public override String ToString()
Returns
Type Description
String

Extension Methods