Skip to main content

Material Skin

Concept​

Milestone: M12, in v0.1 (ADR-40)

Minimal (Minimal Skin) and Fluent were the first two skins; Material is the third, built in M12 once every component exists. It's also the reference dialect used by the "Material mapping preview" in the component notes. The mapping table below already covers all 52 components, M9 to M11 included.

1. Why​

MaterialSkin renders Camouflage in the Material Design 3 dialect and serves as the reference mapping for Skin Contract. It draws every component in Material Design 3 style, on the Paper surface treatment with Ripple feedback. It lives in its own module (camouflage-skin-material) and uses only core's public API. That proves an outside or AI-generated skin can be written the same way. It also ships a starter theme (Material baseline), so a new app can run before its Figma theme exists.

2. Shape​

Build vs wrap. Material renderers are built on the platform's foundation layer (Compose foundation, Flutter widgets), not by wrapping the toolkit's Material components (material3.Button, Flutter FilledButton). Those components read MaterialTheme / ThemeData, not CamoTheme, so wrapping them would mean mirroring every token into a second theme system and inheriting its behavior. The platform notes weigh this trade-off in detail.

3. API​

3.1 Public surface of the module​

NameWhat it's for
MaterialSkinthe skin value to pass to CamouflageProvider
MaterialSkin(options)the options form, for looks only this dialect draws, e.g. expressiveProgress = true (the wavy M3 Expressive indicator). Anything a brand could want on any skin is a component-theme field instead (ADR-28).
Paperthe surface treatment, reusable by other skins
Ripplethe feedback, reusable
materialBaselineLight, materialBaselineDarkstarter CamoThemes with M3 baseline values
materialTheme(seed: Color? = null, dark: Boolean = false, fontFamily: FontFamily? = null)the M3 theme from a seed (null → the baseline colors), with the M3 type scale in fontFamily (null → the platform font)
materialColors(seed, dark)M3 "tonal spot" colors from a seed: fromSeed(primary = seed, neutral = seed) with M3's neutral tones (surface 98, containers 100…90). Core's defaults are Camouflage's grays (ADR-24), so the Material skin brings its own. It also ships M3 shapes (4/8/12/16/28), motion (150/300/500) and the M3 type scale.

3.2 Paper surface treatment​

  • The background is the given color, clipped to the shape.
  • Separation from the background comes from the surface level (surfaceContainer* roles), which is how Material 3 now expresses depth.
  • Elevation adds a shadow:
LevelShadow (dp)
00
11
23
36
48
512

3.3 Ripple feedback​

InteractionState-layer opacity (of the content color)
hovered8%
focused10%, plus a 3dp focus ring in primary when focused by keyboard
pressed10%, plus a bounded ripple from the touch point

Disabled: the container is onSurface at 12% and the content onSurface at 38%, for every tone. There's no feedback.

3.4 Component mapping​

These values are the renderers' defaults(theme): the complete component themes a brand theme overrides field by field. The full field lists, with these defaults, are in each component note under Component theme.

ComponentMaterial 3 equivalentMapping
CamoTextTextstyle as passed. Links in primary + underline.
CamoIconIconambient size and color (24, onSurface at the root)
CamoSurfaceSurfaceSurfaceLevel → surface / surfaceContainerLowest … Highest
CamoCardFilled / Elevated / Outlined cardSoft → surfaceContainerHighest, Raised → surfaceContainerLow + level 1, Outline → surface + outlineVariant, Solid → primary (Camouflage addition). shapes.medium. Status tones → the tone's container colors.
CamoButtonFilled / Filled tonal / Elevated / Outlined / Text buttonSolid / Soft / Raised / Outline / Ghost; Link = underlined Text style. Height 40, shapes.full, padding 24 (16 on a side with an icon), icons 18.
CamoIconButtonFilled / Filled tonal / Outlined / Standard icon buttonSolid / Soft / Outline / Ghost. 40 container, icon 24.
CamoTextFieldOutlined text fieldheight 56, shapes.extraSmall, floating label, icons 24 in onSurfaceVariant
CamoCheckboxCheckbox18 box, 2dp outline, label in bodyLarge
CamoSwitchSwitch52 × 32 track (off: surfaceContainerHighest), thumb 16 → 24 (28 pressed)
CamoTopBarSmall top app barheight 64, title at start, surface → surfaceContainer when scrolled
CamoDialogBasic dialogsurfaceContainerHigh, width 280–560, shapes.extraLarge, actions end-aligned
CamoBottomSheetModal bottom sheetsurfaceContainerLow, top corners shapes.extraLarge, 32 × 4 handle, max width 640
CamoDividerDivider1 dp outlineVariant, insets 16
CamoRadioRadio button20 circle, primary selected, onSurfaceVariant unselected
CamoSegmentedControlSegmented buttons40 tall, outline border, selected secondaryContainer + check
CamoSliderSlider (2024)16 track, 4 × 44 handle bar, value label
CamoDatePickerDate pickers (docked / modal)style Calendar, 40 day cells, primary selected circle, primaryContainer range band
CamoTimePickerTime pickersstyle Dial, primaryContainer for the active part
CamoStepper–layout Inline with outlined icon buttons
CamoSearchFieldSearch bar56, surfaceContainerHigh, shapes.full
CamoAccordion– (lists)a list-item header with a rotating chevron
CamoListItem / SectionLists56 / 72 / 88 rows, bodyLarge headline
CamoMenuMenussurfaceContainer, level 2, 48 items, width 112–280
CamoSelectExposed dropdown menuoutlined text field + chevron → menu or sheet
CamoTooltipPlain tooltipinverseSurface, bodySmall, 24 tall
CamoChipChips (assist, filter, input, suggestion)32 tall, shapes.small, outline or tonal
CamoBadgeBadgesdot 6 / pill 16, error
CamoAvatar(no component; used in lists and chips)circle, initials titleMedium, 24 / 40 / 56
CamoProgressProgress indicators (2024)4 dp bar with gap and stop dot, 48 circle
CamoSnackbarSnackbarinverseSurface, action inversePrimary
CamoBanner(M2 banner; not in M3)soft card per tone with a status icon
CamoTabsPrimary / secondary tabs48 / 64, 3 dp indicator
CamoNavigationBarNavigation bar80, pill indicator 64 × 32
CamoNavigationRailNavigation rail80 wide, pill indicator 56 × 32
CamoNavigationDrawerNavigation drawer360 wide, 56 items, modal with shapes.large corners
CamoPagedList(lists + pull to refresh)M3 pull-to-refresh indicator (a spinner in a raised disc), retry row, centered empty state
CamoSkeleton(none)shimmer, surfaceContainerHighest / surfaceContainerLow
CamoFabFAB, extended FAB40 / 56 / 96, primaryContainer, level 3
CamoPopoverRich tooltipsurfaceContainer, shapes.medium, level2, no arrow, max width 320
CamoSideSheetSide sheets (standard, modal)360, standard surface + outlineVariant edge; modal surfaceContainerLow with shapes.large start corners
CamoToolbarDocked and floating toolbars, bottom app bar64, surfaceContainer; floating shapes.full, level3
CamoButtonGroupButton groups (standard, connected)40, shapes.full ends, the selected button turns primary and rounder
CamoSplitButtonSplit buttontwo segments in a pill, 2 dp gap, 40 + 40 chevron part
CamoDataTablea list-like tablea list-like table: surfaceContainerHigh header, rows 52, outlineVariant dividers, the selected row secondaryContainer
CamoTreeTreeM3 list rows 48 with a chevron, indent 24, the selected row secondaryContainer
CamoCarouselthe M3 carouselmulti-browse and hero layouts, shapes.extraLarge items
CamoImageImageshapes by role, surfaceContainerHigh placeholder
CamoRatingRating24 dp stars, primary filled, outline empty
CamoFileUploaderFile uploadera dashed outline zone, shapes.medium, surfaceContainerLow, linear progress per file
CamoPaginationPagination40 dp buttons, the current page secondaryContainer, chevron arrows; dots for the page control
CamoBreadcrumbBreadcrumbbodyMedium links in primary, chevron separators, an overflow button
CamoProgressStepsProgress indicator24 dp circles, primary complete and current, outlineVariant upcoming, 2 dp connectors

3.4a Material under ADR-42 (materials rule)​

Material draws no blur, glass or window material, so it reads none of the CamoCapabilities and needs no fallback chain: Paper and Ripple draw the same on every target, including with reduceTransparency on. The only context it reads is the input kind (CamoEnvironment.input): hover layers and the 3 dp keyboard focus ring show for a pointer or keyboard, touch shows the ripple alone.

Dialect alignment (required, Design Language §3.4): Appearance × Tone for buttons (f = the tone's family; Material 3 has no status buttons, so tones are Camouflage's consistent extension):

AppearanceMaterial 3 styleDefaultStatus tone x
SolidFilledprimary / onPrimaryx / onX
SoftFilled tonalsecondaryContainer / onSecondaryContainerxContainer / onXContainer
RaisedElevatedsurfaceContainerLow + primary content, level 1surfaceContainerLow + x content
OutlineOutlinedoutline border, primary contentx border and content
GhostTextprimary contentx content
Link(none) Text style + underline, no container paddingprimary contentx content

Tone: Default → primary family, Error → error, Success/Warning/Info → the generated status families. Level: SurfaceLevel → M3 surface containers (one to one).

3.5 Starter theme: materialBaselineLight / materialBaselineDark​

The brand, surface, line, inverse and error roles are the M3 baseline scheme (seed #6750A4). Check them against m3.material.io when implementing, and keep them in one file.

RoleLightDark
primary / onPrimary#6750A4 / #FFFFFF#D0BCFF / #381E72
primaryContainer / onPrimaryContainer#EADDFF / #21005D#4F378B / #EADDFF
secondary / onSecondary#625B71 / #FFFFFF#CCC2DC / #332D41
secondaryContainer / onSecondaryContainer#E8DEF8 / #1D192B#4A4458 / #E8DEF8
tertiary / onTertiary#7D5260 / #FFFFFF#EFB8C8 / #492532
tertiaryContainer / onTertiaryContainer#FFD8E4 / #31111D#633B48 / #FFD8E4
surface#FEF7FF#141218
surfaceContainerLowest / Low#FFFFFF / #F7F2FA#0F0D13 / #1D1B20
surfaceContainer#F3EDF7#211F26
surfaceContainerHigh / Highest#ECE6F0 / #E6E0E9#2B2930 / #36343B
onSurface / onSurfaceVariant#1D1B20 / #49454F#E6E0E9 / #CAC4D0
outline / outlineVariant#79747E / #CAC4D0#938F99 / #49454F
error / onError#B3261E / #FFFFFF#F2B8B5 / #601410
errorContainer / onErrorContainer#F9DEDC / #410E0B#8C1D18 / #F9DEDC
inverseSurface / inverseOnSurface / inversePrimary#322F35 / #F5EFF7 / #D0BCFF#E6E0E9 / #322F35 / #6750A4
scrim#000000#000000

Success, warning and info aren't part of M3. The baseline generates them with CamoColors.fromSeed from the default status seeds (green #2E7D32, amber #F9A825, blue #0288D1), using the tone rule in Theme §3.4. Their generated hex values are written into the baseline file once, and pinned by a snapshot test, so they never shift silently when the color library updates.

Typography: the M3 baseline type scale. The skin doesn't bundle Roboto (skins never bundle fonts): the starter theme takes fontFamily and defaults to the platform font. Roboto on Android; elsewhere the app adds Roboto for the authentic look (materialTheme(fontFamily = Roboto)).

RoleSize / line heightWeightTracking
displayLarge / Medium / Small57/64, 45/52, 36/44400−0.25, 0, 0
headlineLarge / Medium / Small32/40, 28/36, 24/324000
titleLarge / Medium / Small22/28, 16/24, 14/20400, 500, 5000, 0.15, 0.1
bodyLarge / Medium / Small16/24, 14/20, 12/164000.5, 0.25, 0.4
labelLarge / Medium / Small14/20, 12/16, 11/165000.1, 0.5, 0.5

3.6 Chart preset​

Charts are not in the skin contract (ADR-40): Material reaches them through the preset registered for skin.name == "material" (see Chart Frame). The preset ships inside the charts package, next to Minimal and Fluent, so the skin module does not depend on it.

ChartStyle fieldMaterialWhy
lineWidth3M3 indicators are 4 dp strokes; 3 keeps two lines apart
markerSize8the M3 "handle" feel, round dots
areaOpacity0.16the tonal container steps are about 16% of the accent
barRadius8shapes.small on the free end, as the progress bar's end caps
barGap2the gap of connected button groups
gridDashedfalseoutlineVariant hairlines, solid
sliceGap4the 4 dp gap M3 puts between segments
donutThickness0.3a thick ring, like the circular indicator

The palette stays the theme's (the color families), and the tooltip uses the inverseSurface roles like the Material tooltip. Tokens can change any of it per brand (ChartTokens).

4. Build steps​

M12 builds the skin in four reviewed batches that follow the five task cards (the platform notes list them): the module and theme, then the renderers by group, then the M9 to M11 renderers and the chart preset. The steps below are the order inside them.

  1. Implement Paper and Ripple first. Test them on a bare CamoSurface with DebugSkin.copy(surfaceTreatment = Paper, feedback = Ripple).
  2. Implement the renderers in checklist order: text → icon → surface → button → iconButton → card → checkbox → switch → textField → topBar → dialog → bottomSheet. M3 ("Hello skin") needs only text, icon, surface and button. The rest land in M5/M6.
  3. Assemble MaterialSkin and its options. Write a test per renderer that sets every field of its component theme to a distinctive value and checks the rendering uses it (no literal left in a renderer).
  4. Add materialBaselineLight/Dark. Generate the status families, write them in, and add the snapshot test. validate() must return no issues for both.
  5. Run the screenshot matrix: each component × light/dark × 100/200% font × LTR/RTL, plus buttons × every tone.
  6. Build the M4 demo: the same screen with materialBaselineLight and a custom brand theme, switched live.

Done when

  • All 52 renderers are implemented, using only core's public API, and the M9 to M11 components render in Material.
  • Baseline themes validate cleanly, and the status colors are pinned by a snapshot.
  • The screenshot matrix is reviewed and recorded as goldens.
  • A custom brand theme visibly rebrands every component without code changes.

5. Edge cases​

CaseDecided behavior
Where Camouflage deviates from M3M3 has no Link button (Camouflage draws it as an underlined text button) and no Solid card (Camouflage draws it with primary). Status tones on buttons and cards are a Camouflage extension; M3 has only error. surfaceBright/surfaceDim and the "fixed" accent roles aren't included.
Android 12+ dynamic colorWorks through the theme (dynamicCamoColors(), in the Kotlin note). The skin doesn't change.
Brand theme with poor contrastThe skin draws what the theme says. validate() flags it.
A renderer overridden by the app (MaterialSkin.copy(button = X))Other renderers are unaffected. Dialog buttons are the caller's CamoButtons, so they use the override too.
Material Expressive (the 2025 M3 update: new shapes and motion)Out of v1. It could arrive as a skin option or a separate skin.
Changed in the M12 build (2026-11-05)
  • Expressive progress waves the linear indicator only; the circular one stays.
  • Time picker field is 64, not the 72 first planned (a 45 sp digit fits, and the popup is narrow on a phone).
  • Defaults: the card's default form is Filled (Soft, surfaceContainerHighest); text fields float their label; the switch shows thumb icons; the segmented control is outlined with a check on the selected segment.
  • Both platforms ship the chart preset in §3.6 as "material".

Implementation​

Milestone: M12, in v0.1 (ADR-40)

Read the base note first: Material Skin. Minimal and Fluent came first, so the module follows the layout of camouflage-skin-fluent (MaterialSkin.kt, MaterialTheme.kt, Paper.kt, Ripple.kt, and renderer/Material*.kt grouped like Fluent's). This note is the platform plan.

1. Why​

:camouflage-skin-material implements every renderer in Material 3 style using only Compose foundation + material-ripple, plus camouflage-core's public API. This note records the build-vs-wrap decision, the ripple wiring, and how the baseline themes are packaged.

2. Shape​

Build on foundation vs wrap material3​

Build on foundation (chosen)Wrap material3 components
Reads CamoTheme directlyyesno: every token must be mirrored into a MaterialTheme inside each renderer
Component themes (ButtonStyle.height …)every field honoredmany fields have no material3 parameter (a button's exact height, the thumb sizes)
Behavior split (core owns click and semantics)clean: the renderer only drawsfights material3, which owns its own click, semantics and minimumInteractiveComponentSize
Dependency weightfoundation + material-ripple (small)the whole material3 artifact
Faithfulness to M3 specsour job (specs in the base note)free
Efforthigherlower at first, then higher when fighting the gaps

Wrapping would make Camouflage a thin Material theme adapter, which is exactly what the project exists to avoid.

3. API​

public val MaterialSkin: CamoSkin = materialSkin()

public fun materialSkin(expressiveProgress: Boolean = false): CamoSkin = CamoSkin(
name = "material",
surfaceTreatment = Paper,
feedback = Ripple,
text = MaterialTextRenderer, icon = MaterialIconRenderer, surface = MaterialSurfaceRenderer,
card = MaterialCardRenderer, button = MaterialButtonRenderer, iconButton = MaterialIconButtonRenderer,
textField = MaterialTextFieldRenderer, checkbox = MaterialCheckboxRenderer,
switch = MaterialSwitchRenderer, // thumb icons come from SwitchStyle.showThumbIcons (default true here) topBar = MaterialTopBarRenderer, dialog = MaterialDialogRenderer,
bottomSheet = MaterialBottomSheetRenderer,
)

public object Paper : SurfaceTreatment {
override fun modifier(color: Color, shape: Shape, elevation: Dp, theme: CamoTheme): Modifier =
Modifier.shadow(elevation, shape, clip = false).background(color, shape).clip(shape)
}

public object Ripple : InteractionFeedback {
override fun indication(contentColor: Color, theme: CamoTheme): Indication = MaterialIndication(contentColor)
}

public val materialBaselineLight: CamoTheme
public val materialBaselineDark: CamoTheme

MaterialIndication (internal) is an IndicationNodeFactory whose node delegates to:

  1. createRippleModifierNode(interactionSource, bounded = true, radius = Dp.Unspecified, color = { contentColor }, rippleAlpha = { MaterialRippleAlpha }), the public low-level API in material-ripple, which draws the touch ripple;
  2. a state-layer node that draws contentColor at 8% (hover) or 10% (focus/press) over the bounds;
  3. a focus-ring node that draws a 3 dp primary outline when focus came from the keyboard.

MaterialRippleAlpha = RippleAlpha(draggedAlpha = 0.16f, focusedAlpha = 0.10f, hoveredAlpha = 0.08f, pressedAlpha = 0.10f).

Baseline theme packaging:

  • MaterialBaselineColors.kt holds the M3 hex values from the base note, written out.
  • The status families are generated once with CamoColors.fromSeed and pasted as literals, with a comment naming the seed and the MaterialKolor version.
  • commonTest has a snapshot test asserting the literals still equal fromSeed output. It fails loudly if a library bump changes them, and you decide whether to update.

Typography: the M3 type-scale values from the base note as TextStyles with FontFamily.Default. Roboto isn't bundled (ADR-33): materialTheme(fontFamily = …) takes an app-provided family. On Android, the default is Roboto anyway.

4. Build steps​

M12 is built in one pass (the user's ruling, 2026-11-05: CamoSkin has no defaults, so a Material skin can't compile as a skin until every renderer exists), then reviewed as a whole. The five task cards close together.

Steps:

  1. Paper, MaterialIndication (ripple + state layer + focus ring), Ripple.
  2. The renderers of the batch, in checklist order.
  3. materialSkin() / MaterialSkin.
  4. The baseline themes + the snapshot test.
  5. Run assertRendererAppliesBehavior (from Skin Contract §5) on every clickable renderer.
  6. The "no literals" test per renderer: set every XTheme field to an odd value (e.g. height 57 dp), and assert the rendered node measures it.
  7. Screenshot goldens (Testing).
  8. The M4 demo: a brand theme vs baseline, live-switched.

Done when

  • :camouflage-skin-material has no material3 dependency (./gradlew :camouflage-skin-material:dependencies).
  • Every renderer passes the behavior and no-literals tests.
  • Goldens are recorded for Android and desktop, and iOS where Roborazzi supports it. Local macOS renders are replaced by CI's Linux ones.
  • The module is at layer 1 (checkModuleLayers), in the BOM, and the sample switches Minimal / Fluent / Material live.
  • CamoCharts has the "material" preset and the four charts render in the skin.

5. Edge cases​

CaseDecided behavior
createRippleModifierNode API changesIt's public but low-level. It's pinned through the Compose Multiplatform version, and the Ripple wrapper is the only file touching it.
Ripple on web / iOSmaterial-ripple works on every Compose Multiplatform target. On iOS it looks Material (expected for this skin; a Cupertino skin uses Opacity).
M3 spec updates (Expressive)Out of v1 (base note).
App overrides a rendererMaterialSkin.copy(button = X): the other renderers keep reading Camouflage.skin.feedback, so feedback stays consistent.
Changed in the M12 build (2026-11-05)
  • One pass, not four batches. CamoSkin requires every renderer, so the skin was built whole. The module started as a copy of camouflage-skin-minimal (Minimal's renderers are overlay-based like Material's), with every default, shape and structure reworked to the M3 table in the base note.
  • Files: Paper.kt, Ripple.kt, MaterialTheme.kt (materialTheme(seed, dark, fontFamily), materialColors, the baselines, MaterialBaselineSeed), MaterialSkin.kt (materialSkin(expressiveProgress), MaterialSkin, MaterialPreview), renderer/Material*.kt grouped like Fluent's, and renderer/MaterialWavy.kt.
  • Ripple is a DelegatingNode: the touch ripple is material-ripple's createRippleModifierNode (RippleAlpha: pressed 10%, dragged 16%); the 8% hover and 10% focus state layer and the 3 dp keyboard focus ring are drawn by the skin. material-ripple is the only Material artifact (composeLibs.ripple).
  • Paper is Modifier.shadow(...).background(...).clip(...); shadows are the theme's elevation levels (1, 3, 6, 8, 12 dp).
  • Baseline: the M3 roles are literals; the status families are literals too, and MaterialBaselineTest fails if fromSeed would generate different ones. materialTheme(seed) uses fromSeed(primary = seed, neutral = seed).
  • Defaults that differ from the first plan: the text field is floating-label by default (56 dp, extraSmall); the switch shows thumb icons by default; the slider is the 2024 handle-bar slider with stop marks; segmented buttons share one outline; the card defaults to the Filled (Soft) form; the FAB defaults to primaryContainer; the time picker's field is 64 dp; the dialog is surfaceContainerHigh at level 3.
  • expressiveProgress waves the linear indicator only (MaterialWavyProgressBarRenderer: a 3 dp amplitude, 40 dp wavelength, drifting; static under reduced motion). The circular indicator stays.
  • Charts: the "material" preset is in CamoCharts (line 3, markers 8, area 16%, bar radius 8, bar gap 2, slice gap 4, donut 0.3); the charts goldens gained material_light and material_dark.
  • Sample: SampleSkin.Material (with the brand seed through materialTheme(seed)); BrandThemeTest covers it. Layer 1 in build.gradle.kts; the BOM picks it up by name.
  • The goldens are macOS renders; CI's Linux ones replace them after the first run.