Complete the code to apply a 3-color scale conditional formatting rule in Google Sheets.
ApplyConditionalFormat(range, {colorScale: {minpoint: {type: 'min'}, midpoint: {type: 'percentile', value: 50}, maxpoint: {type: 'max'}, colors: ['red', [1], 'green']}})The middle color in a 3-color scale is often yellow to show mid values between red (low) and green (high).
Complete the code to set the minimum point type to 'number' with value 0 in a color scale.
ApplyConditionalFormat(range, {colorScale: {minpoint: {type: [1], value: 0}, midpoint: {type: 'percentile', value: 50}, maxpoint: {type: 'max'}, colors: ['red', 'yellow', 'green']}})Setting minpoint type to 'number' allows specifying an exact numeric value for the minimum color scale point.
Fix the error in the color scale code by choosing the correct color format for the maxpoint color.
ApplyConditionalFormat(range, {colorScale: {minpoint: {type: 'min'}, midpoint: {type: 'percentile', value: 50}, maxpoint: {type: 'max'}, colors: ['red', 'yellow', [1]]}})Google Sheets color scales accept hex color codes like '#00FF00' for green. Named colors like 'green' may not always work.
Fill both blanks to create a 2-color scale from blue to white.
ApplyConditionalFormat(range, {colorScale: {minpoint: {type: [1], maxpoint: {type: [2], colors: ['blue', 'white']}})For a 2-color scale, minpoint type is 'min' and maxpoint type is 'max' to cover the full range.
Fill all three blanks to create a 3-color scale with min as 0, midpoint at 50 percentile, and max as 100.
ApplyConditionalFormat(range, {colorScale: {minpoint: {type: [1], value: 0}, midpoint: {type: [2], value: 50}, maxpoint: {type: [3], value: 100}, colors: ['red', 'yellow', 'green']}})Minpoint and maxpoint use 'number' type with values 0 and 100. Midpoint uses 'percentile' type with value 50.