ColorSet.of constructor
ColorSet.of(
- Color backgroundColor
Factory method to create a ColorSet from a given background or surface color.
Implementation
factory ColorSet.of(Color backgroundColor) {
Color foregroundColor = getOnSurfaceColor(backgroundColor);
Color mutedForegroundColor = reduceAlpha(foregroundColor);
return ColorSet(backgroundColor, foregroundColor, mutedForegroundColor);
}