Package 

Class StreamDesign.ColorScale


  • @Immutable() 
    public final class StreamDesign.ColorScale
    
                        

    An 11-stop color ramp representing the brand (accent) palette.

    In the Stream design system the brand scale maps to blue by 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),
            ),
        ),
    )
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final Color s50
      private final Color s100
      private final Color s150
      private final Color s200
      private final Color s300
      private final Color s400
      private final Color s500
      private final Color s600
      private final Color s700
      private final Color s800
      private final Color s900
    • 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 Color getS50()
      final Color getS100()
      final Color getS150()
      final Color getS200()
      final Color getS300()
      final Color getS400()
      final Color getS500()
      final Color getS600()
      final Color getS700()
      final Color getS800()
      final Color getS900()
      final StreamDesign.ColorScale inverted() Returns a new scale with the stops mirrored around the center.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.