public class WallpaperColorsCollection extends Object
The colors are obtained in descending order of their dominance. You can use
WallpaperColorsCollection#count() to obtain the number of the dominant colors.
SystemCapability.Miscservices#WALLPAPER| 限定符和类型 | 方法 | 说明 |
|---|---|---|
int |
count() |
Obtains the number of dominant colors.
|
RgbColor |
getNthRepresentativeColor(int nth) |
Obtains the dominant color at the specified index.
|
boolean |
hasNext() |
Checks whether there are other dominant colors.
|
RgbColor |
next() |
Obtains the next dominant color of the wallpaper.
|
public RgbColor next()
public int count()
public boolean hasNext()
true if there are other dominant colors; returns false otherwise.public RgbColor getNthRepresentativeColor(int nth)
nth to 0, the primary dominant
color will be returned.nth - Indicates the index of the dominant color to obtain. The value is an integer starting from 0.null if nth >=
WallpaperColorsCollection#count().