onTone
Pick the tone from this palette that is readable on top of toneColor at tone.
Roles like onPrimary give you a content color for the tone Material happened to pick. When you pick the tone yourself, this gives you the matching content color from the same ramp, so a hand-built theme never needs a hand-written background to content lookup table.
The search moves away from the middle of the ramp, darker for a light tone and lighter for a dark one, and takes the first tone that clears threshold. When the ramp runs out before the ratio is met, the nearer end of the ramp is returned, which is the most readable color the palette has to offer.
Receiver
The TonalPalette to take both the background and the content tone from.
Return
A Color from this palette that contrasts with toneColor(tone).
Parameters
HCT tone of the background, measured from 0 to 100.
The contrast ratio the returned color should reach.