-
@Immutable() public final class StreamDesign.ColorScaleAn 11-stop color ramp representing the brand (accent) palette.
In the Stream design system the brand scale maps to
blueby default. Light themes use the natural order (s50 = lightest, s900 = darkest); dark themes invert the mapping so that perceptual intensity stays consistent (s50 is still the faintest tint suitable for backgrounds).Re-brand the entire Chat UI from a single color:
val purple = StreamDesign.ColorScale.from(brandColor = Color(0xFF6200EE)) ChatTheme(colors = StreamDesign.Colors.default(brand = purple))For pixel-perfect branding, provide an explicit scale:
ChatTheme( colors = StreamDesign.Colors.default( brand = StreamDesign.ColorScale( s50 = Color(0xFFF3E8FF), // … s900 = Color(0xFF3B0764), ), ), )
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classStreamDesign.ColorScale.Companion
-
Field Summary
Fields Modifier and Type Field Description private final Colors50private final Colors100private final Colors150private final Colors200private final Colors300private final Colors400private final Colors500private final Colors600private final Colors700private final Colors800private final Colors900
-
Constructor Summary
Constructors Constructor Description StreamDesign.ColorScale(Color s50, Color s100, Color s150, Color s200, Color s300, Color s400, Color s500, Color s600, Color s700, Color s800, Color s900)
-
Method Summary
Modifier and Type Method Description final ColorgetS50()final ColorgetS100()final ColorgetS150()final ColorgetS200()final ColorgetS300()final ColorgetS400()final ColorgetS500()final ColorgetS600()final ColorgetS700()final ColorgetS800()final ColorgetS900()final StreamDesign.ColorScaleinverted()Returns a new scale with the stops mirrored around the center. -
-
Constructor Detail
-
StreamDesign.ColorScale
StreamDesign.ColorScale(Color s50, Color s100, Color s150, Color s200, Color s300, Color s400, Color s500, Color s600, Color s700, Color s800, Color s900)
- Parameters:
s50- Faintest tint — backgrounds, subtle fills.s100- Light tint — outgoing bubble background.s150- Light-mid tint — attachment backgrounds, thread connectors.s200- Mid-light tint — primary button border, poll track.s300- Mid-tint — outgoing bubble on-chat border.s400- Mid-strong — interactive accent (dark theme default).s500- Core brand — interactive accent (light theme default).s600- Strong — link text (dark theme).s700- Darker — reply indicator (dark theme).s800- Deep — brand depth.s900- Deepest — outgoing text.
-
-
Method Detail
-
getS50
final Color getS50()
-
getS100
final Color getS100()
-
getS150
final Color getS150()
-
getS200
final Color getS200()
-
getS300
final Color getS300()
-
getS400
final Color getS400()
-
getS500
final Color getS500()
-
getS600
final Color getS600()
-
getS700
final Color getS700()
-
getS800
final Color getS800()
-
getS900
final Color getS900()
-
inverted
final StreamDesign.ColorScale inverted()
Returns a new scale with the stops mirrored around the center.
s50↔s900,s100↔s800, etc., whiles400stays in place. Use this to create a dark-theme counterpart from a light brand ramp.
-
-
-
-