JengaColors

class JengaColors(val brand: Color, val onBrand: Color, val brandSubtle: Color, val onBrandSubtle: Color, val ink: Color, val onInk: Color, val background: Color, val surface: Color, val surfaceVariant: Color, val surfaceSunk: Color, val textPrimary: Color, val textSecondary: Color, val textMuted: Color, val textFaint: Color, val border: Color, val borderStrong: Color, val contentDisabled: Color, val surfaceDisabled: Color, val borderDisabled: Color, val inverseSurface: Color, val inverseOnSurface: Color, val success: Color, val successContainer: Color, val onSuccessContainer: Color, val warning: Color, val warningContainer: Color, val onWarningContainer: Color, val error: Color, val errorContainer: Color, val onErrorContainer: Color, val info: Color, val infoContainer: Color, val onInfoContainer: Color, val overlaySurface: Color, val onOverlay: Color, val onOverlayMuted: Color, val focusRing: Color, val scrim: Color, val isLight: Boolean)(source)

Semantic color layer: colors named by role, not by hue.

This is the public color contract of Jenga. Components read these roles (e.g. brand, surface, textPrimary) and never the raw JengaPalette. Because roles are theme-independent in name but theme-dependent in value, the same component renders correctly in light and dark simply by swapping the JengaColors instance (jengaLightColors vs jengaDarkColors).

Rebrand or white-label by passing a copy(...) of one of the factories to JengaTheme(colors = ...).

Status roles follow a content / container / onContainer triad:

  • success: the vivid accent (dots, icons, borders, emphasis)

  • successContainer: a tinted background for banners/badges

  • onSuccessContainer: readable text/icon color on that container

Constructors

Link copied to clipboard
constructor(brand: Color, onBrand: Color, brandSubtle: Color, onBrandSubtle: Color, ink: Color, onInk: Color, background: Color, surface: Color, surfaceVariant: Color, surfaceSunk: Color, textPrimary: Color, textSecondary: Color, textMuted: Color, textFaint: Color, border: Color, borderStrong: Color, contentDisabled: Color, surfaceDisabled: Color, borderDisabled: Color, inverseSurface: Color, inverseOnSurface: Color, success: Color, successContainer: Color, onSuccessContainer: Color, warning: Color, warningContainer: Color, onWarningContainer: Color, error: Color, errorContainer: Color, onErrorContainer: Color, info: Color, infoContainer: Color, onInfoContainer: Color, overlaySurface: Color, onOverlay: Color, onOverlayMuted: Color, focusRing: Color, scrim: Color, isLight: Boolean)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val info: Color
Link copied to clipboard
Link copied to clipboard
val ink: Color
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

whether this palette targets a light background. Components may branch on this for effects that can't be expressed as a single token (e.g. choosing an elevation overlay strategy).

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun copy(brand: Color = this.brand, onBrand: Color = this.onBrand, brandSubtle: Color = this.brandSubtle, onBrandSubtle: Color = this.onBrandSubtle, ink: Color = this.ink, onInk: Color = this.onInk, background: Color = this.background, surface: Color = this.surface, surfaceVariant: Color = this.surfaceVariant, surfaceSunk: Color = this.surfaceSunk, textPrimary: Color = this.textPrimary, textSecondary: Color = this.textSecondary, textMuted: Color = this.textMuted, textFaint: Color = this.textFaint, border: Color = this.border, borderStrong: Color = this.borderStrong, contentDisabled: Color = this.contentDisabled, surfaceDisabled: Color = this.surfaceDisabled, borderDisabled: Color = this.borderDisabled, inverseSurface: Color = this.inverseSurface, inverseOnSurface: Color = this.inverseOnSurface, success: Color = this.success, successContainer: Color = this.successContainer, onSuccessContainer: Color = this.onSuccessContainer, warning: Color = this.warning, warningContainer: Color = this.warningContainer, onWarningContainer: Color = this.onWarningContainer, error: Color = this.error, errorContainer: Color = this.errorContainer, onErrorContainer: Color = this.onErrorContainer, info: Color = this.info, infoContainer: Color = this.infoContainer, onInfoContainer: Color = this.onInfoContainer, overlaySurface: Color = this.overlaySurface, onOverlay: Color = this.onOverlay, onOverlayMuted: Color = this.onOverlayMuted, focusRing: Color = this.focusRing, scrim: Color = this.scrim, isLight: Boolean = this.isLight): JengaColors
Link copied to clipboard
fun JengaColors.withBrand(brand: Color, onBrand: Color = this.onBrand, brandSubtle: Color = this.brandSubtle, onBrandSubtle: Color = this.onBrandSubtle): JengaColors

Multi-brand convenience: returns a copy of this scheme rebranded to brand. The semantic structure (surfaces, text, lines, status) is untouched; only the brand accent and its subtle/on pairs change.