instrument: one staged-envelope system — per-segment curves, the sustain-less AHD, and a shared overlay for all three envelopes
Trigger's fade pair folds into the AHD (and goes live); the release anchors right; Preserve rings its synthetic tail out instead of cutting it. Payload v10.
This commit is contained in:
@@ -121,6 +121,27 @@ static void testSecondaryTertiaryAreDistinguishable() {
|
||||
CHECK(delta >= 60);
|
||||
}
|
||||
|
||||
// The instrument's envelope overlay is traced OVER the waveform, which draws in the primary
|
||||
// accent — an accent-on-accent pair no floor covers, since neither is a surface. It moved from
|
||||
// the secondary to the tertiary for exactly this reason, so the pair is pinned two ways: the
|
||||
// tertiary must separate from the primary MORE than the secondary did (the measurable half of
|
||||
// the move), and the separation is a hue one, since two pastels sit close in luminance by
|
||||
// construction. Whether the result reads clearly is a perceptual call, not this test's.
|
||||
static void testOverlayAccentSeparatesFromTheWaveformAccent() {
|
||||
const KitColor wave = roleColor(Role::AccentPrimary);
|
||||
const KitColor overlay = roleColor(Role::AccentTertiary);
|
||||
const KitColor prior = roleColor(Role::AccentSecondary);
|
||||
CHECK(contrastRatio(overlay, wave) > contrastRatio(prior, wave));
|
||||
// Hue divergence against the waveform: the waveform's green dominates its red, the
|
||||
// overlay's red dominates its green — opposite balances, not two shades of one.
|
||||
CHECK(wave.g > wave.r);
|
||||
CHECK(overlay.r > overlay.g);
|
||||
const int delta = std::abs(int(wave.r) - int(overlay.r)) +
|
||||
std::abs(int(wave.g) - int(overlay.g)) +
|
||||
std::abs(int(wave.b) - int(overlay.b)) ;
|
||||
CHECK(delta >= 60);
|
||||
}
|
||||
|
||||
static void testWarnClearsStateFloorOnBackground() {
|
||||
// warn (destructive) must be unmistakable -> clears the state floor on the base.
|
||||
CHECK(contrastRatio(roleColor(Role::Warn), roleColor(Role::BgBase))
|
||||
@@ -237,6 +258,7 @@ int main() {
|
||||
testTextOnPastelFillClearsBodyFloor();
|
||||
testTextOnHoverSurfaceClearsFloor();
|
||||
testSecondaryTertiaryAreDistinguishable();
|
||||
testOverlayAccentSeparatesFromTheWaveformAccent();
|
||||
testWarnClearsStateFloorOnBackground();
|
||||
testLabelOnActiveSurfaceClearsFloor();
|
||||
testRolesAreDistinctAndElevationMonotonic();
|
||||
|
||||
Reference in New Issue
Block a user