Package 

Object StreamDesign.ColorScale.Companion

    • Method Detail

      • defaultDark

         final StreamDesign.ColorScale defaultDark()

        Default brand scale for dark themes.

        Inverts the mapping: brand 50 → blue 900, brand 900 → blue 50, so that perceptual intensity is preserved on dark backgrounds.

      • from

         final StreamDesign.ColorScale from(Color brandColor)

        Generates a brand scale from a single brandColor.

        The input is placed at s500 (the core brand stop). Lighter stops are interpolated toward white and darker stops toward black using Oklab perceptual color space.

        This is an approximation intended for quick re-branding. For pixel-perfect results, provide an explicit ColorScale.

        Use inverted to obtain the dark-theme counterpart:

        val purple = ColorScale.from(brandColor = Color(0xFF6200EE))
        val light  = Colors.default(brand = purple)
        val dark   = Colors.defaultDark(brand = purple.inverted())
        Parameters:
        brandColor - The core brand color (maps to s500).