Skip to content

Commit e014886

Browse files
authored
remove 9 increament (#2861)
1 parent 4f78607 commit e014886

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

src/style/__tests__/colors.spec.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ describe('style/Colors', () => {
122122
const tintsLight = ['#1A3851', '#265278', '#326D9F', '#4187C3', '#68A0CF', '#8EB8DC', '#B5D1E8', '#DCE9F4'];
123123
const saturationLevels = [-10, -10, -20, -20, -25, -25, -25, -25, -20, -10];
124124
const tintsSaturationLevels = ['#1E384D', '#2D5271', '#466C8C', '#3F88C5', '#7F9EB8', '#A0B7CB', '#C1D0DD', '#E2E9EE'];
125-
const tintsSaturationLevelsDarkest = ['#162837', '#223F58', '#385770', '#486E90', '#3F88C5', '#7C9CB6', '#9AB2C6', '#B7C9D7', '#D3DFE9', '#F0F5F9'];
126-
const tintsAddDarkestTints = ['#12283B', '#1C405E', '#275881', '#3270A5', '#3F88C5', '#629ED0', '#86B4DA', '#A9CAE5', '#CCDFF0', '#EFF5FA'];
125+
// const tintsSaturationLevelsDarkest = ['#162837', '#223F58', '#385770', '#486E90', '#3F88C5', '#7C9CB6', '#9AB2C6', '#B7C9D7', '#D3DFE9', '#F0F5F9'];
126+
// const tintsAddDarkestTints = ['#12283B', '#1C405E', '#275881', '#3270A5', '#3F88C5', '#629ED0', '#86B4DA', '#A9CAE5', '#CCDFF0', '#EFF5FA'];
127127

128128
it('should memoize calls for generateColorPalette', () => {
129129
uut.getColorTint(baseColor, 20);
@@ -162,13 +162,13 @@ describe('style/Colors', () => {
162162
expect(palette).toEqual(tintsSaturationLevels);
163163
});
164164

165-
it('should generateColorPalette with adjustSaturation option true and saturationLevels 10 array and addDarkestTints true', () => {
166-
const options = {adjustSaturation: true, saturationLevels, addDarkestTints: true};
167-
const palette = uut.generateColorPalette(baseColor, options);
168-
expect(palette.length).toBe(10);
169-
expect(palette).toContain(baseColor); // adjusting baseColor tint as well
170-
expect(palette).toEqual(tintsSaturationLevelsDarkest);
171-
});
165+
// it('should generateColorPalette with adjustSaturation option true and saturationLevels 10 array and addDarkestTints true', () => {
166+
// const options = {adjustSaturation: true, saturationLevels, addDarkestTints: true};
167+
// const palette = uut.generateColorPalette(baseColor, options);
168+
// expect(palette.length).toBe(10);
169+
// expect(palette).toContain(baseColor); // adjusting baseColor tint as well
170+
// expect(palette).toEqual(tintsSaturationLevelsDarkest);
171+
// });
172172

173173
it('should generateColorPalette with avoidReverseOnDark option false not reverse on light mode (default)', () => {
174174
const palette = uut.generateColorPalette(baseColor, {avoidReverseOnDark: false});
@@ -191,12 +191,12 @@ describe('style/Colors', () => {
191191
expect(palette).toEqual(tints);
192192
});
193193

194-
it('should generateColorPalette with addDarkestTints option true return 10 tints with 9 lightness increment', () => {
195-
const palette = uut.generateColorPalette(baseColor, {addDarkestTints: true});
196-
expect(palette.length).toBe(10);
197-
expect(palette).toContain(baseColor);
198-
expect(palette).toEqual(tintsAddDarkestTints);
199-
});
194+
// it('should generateColorPalette with addDarkestTints option true return 10 tints with 9 lightness increment', () => {
195+
// const palette = uut.generateColorPalette(baseColor, {addDarkestTints: true});
196+
// expect(palette.length).toBe(10);
197+
// expect(palette).toContain(baseColor);
198+
// expect(palette).toEqual(tintsAddDarkestTints);
199+
// });
200200
});
201201

202202
describe('generateDesignTokens', () => {

src/style/colors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ export class Colors {
229229
const isWhite = lightness === 100;
230230
const lightnessLevel = options?.addDarkestTints ? (isWhite ? 5 : 0) : 20;
231231
const lightColorsThreshold = options?.adjustLightness && this.shouldGenerateDarkerPalette(color) ? 5 : 0;
232-
const step = options?.addDarkestTints ? 9 : 10;
232+
const step = /* options?.addDarkestTints ? 9 : */10;
233233
const ls = [colorLightness];
234234

235235
let l = lightness - step;

0 commit comments

Comments
 (0)