From a37e0a38df5b300d5d2634d35e4fcc3504674aa2 Mon Sep 17 00:00:00 2001 From: AgustinVallejo Date: Mon, 7 Oct 2024 14:34:43 -0500 Subject: [PATCH] Adding gradient to the color profile, see https://github.com/phetsims/quantum-measurement/issues/49 --- js/coins/view/MultiCoinTestBox.ts | 13 +++++++------ js/common/QuantumMeasurementColors.ts | 13 +++++++++++++ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/js/coins/view/MultiCoinTestBox.ts b/js/coins/view/MultiCoinTestBox.ts index b0da788..3629b83 100644 --- a/js/coins/view/MultiCoinTestBox.ts +++ b/js/coins/view/MultiCoinTestBox.ts @@ -19,6 +19,7 @@ import WithRequired from '../../../../phet-core/js/types/WithRequired.js'; import { Color, HBox, HBoxOptions, LinearGradient, Node, Rectangle } from '../../../../scenery/js/imports.js'; import isSettingPhetioStateProperty from '../../../../tandem/js/isSettingPhetioStateProperty.js'; import TwoStateSystemSet from '../../common/model/TwoStateSystemSet.js'; +import quantumMeasurementColors from '../../common/QuantumMeasurementColors.js'; import quantumMeasurement from '../../quantumMeasurement.js'; import { MULTI_COIN_ANIMATION_QUANTITIES } from '../model/CoinsExperimentSceneModel.js'; import { ExperimentMeasurementState } from '../model/ExperimentMeasurementState.js'; @@ -30,11 +31,11 @@ export type MultiCoinTestBoxOptions = SelfOptions & WithRequired()( { @@ -90,7 +91,7 @@ export default class MultiCoinTestBox extends HBox { // Make the box look hazy when the measurement is not revealed. multipleCoinTestBoxRectangle.fill = measurementState === 'revealed' ? - TEST_BOX_CONTENTS_REVEALED_FILL : + TEST_BOX_CONTENTS_REVEALED_FILL_COLOR_PROPERTY : TEST_BOX_CONTENTS_HIDDEN_FILL; // Update the appearance of the coin nodes. diff --git a/js/common/QuantumMeasurementColors.ts b/js/common/QuantumMeasurementColors.ts index 63b1f47..254b730 100644 --- a/js/common/QuantumMeasurementColors.ts +++ b/js/common/QuantumMeasurementColors.ts @@ -112,6 +112,19 @@ const QuantumMeasurementColors = { // Initial Orientation/Basis States panel fill basisStatesPanelFillColorProperty: new ProfileColorProperty( quantumMeasurement, 'basisStatesPanelFill', { default: '#EEE' + } ), + + multiCoinFirstGradientColorProperty: new ProfileColorProperty( quantumMeasurement, 'multiCoinFirstGradient', { + default: '#EEE' + } ), + multiCoinSecondGradientColorProperty: new ProfileColorProperty( quantumMeasurement, 'multiCoinSecondGradient', { + default: '#cceae8' + } ), + testBoxContentsRevealedFillColorProperty: new ProfileColorProperty( quantumMeasurement, 'testBoxContentsRevealedFill', { + default: 'rgba( 255, 255, 255, 0 )' + } ), + landingZoneFillColorProperty: new ProfileColorProperty( quantumMeasurement, 'landingZoneFill', { + default: 'rgba( 255, 192, 203, 0.5 )' } ) };