Skip to content

Commit ee1d755

Browse files
committed
refactor(themes): remove colors usage before initiating
1 parent c53560e commit ee1d755

File tree

3 files changed

+8
-13
lines changed

3 files changed

+8
-13
lines changed

core/src/themes/base/dark.tokens.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { mix, generateColorSteps } from '../../utils/theme';
22
import type { DarkTheme } from '../themes.interfaces';
33

4-
import { colors as defaultColors } from './default.tokens';
5-
64
export const colors = {
75
primary: '#4d8dff',
86
secondary: '#46b1ff',
@@ -13,7 +11,7 @@ export const colors = {
1311
light: '#222428',
1412
medium: '#989aa2',
1513
dark: '#f4f5f8',
16-
gray: generateColorSteps(defaultColors.white, defaultColors.black, true),
14+
gray: generateColorSteps('#ffffff', '#000', true),
1715
};
1816

1917
export const darkTheme: DarkTheme = {

core/src/themes/base/high-contrast-dark.tokens.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { generateColorSteps, mix } from '../../utils/theme';
22
import type { HighContrastDarkTheme } from '../themes.interfaces';
33

4-
import { colors as defaultDarkColors } from './dark.tokens';
5-
import { colors as defaultColors } from './default.tokens';
4+
import { colors as baseDarkColors } from './dark.tokens';
65

76
const colors = {
87
primary: '#7cabff',
@@ -14,7 +13,7 @@ const colors = {
1413
light: '#222428',
1514
medium: '#a8aab3',
1615
dark: '#f4f5f8',
17-
gray: defaultDarkColors.gray,
16+
gray: baseDarkColors.gray,
1817
};
1918

2019
export const highContrastDarkTheme: HighContrastDarkTheme = {
@@ -168,8 +167,8 @@ export const highContrastDarkTheme: HighContrastDarkTheme = {
168167
text: generateColorSteps('#ffffff', '#888888', true),
169168
},
170169

171-
backgroundColor: defaultColors.black,
170+
backgroundColor: '#000000',
172171
backgroundColorRgb: '0, 0, 0',
173-
textColor: defaultColors.white,
172+
textColor: '#ffffff',
174173
textColorRgb: '255, 255, 255',
175174
};

core/src/themes/base/high-contrast.tokens.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { generateColorSteps, mix } from '../../utils/theme';
22
import type { HighContrastTheme } from '../themes.interfaces';
33

4-
import { colors as defaultColors } from './default.tokens';
5-
64
const colors = {
75
primary: '#003fae',
86
secondary: '#01487b',
@@ -162,11 +160,11 @@ export const highContrastTheme: HighContrastTheme = {
162160
tint: mix('#fff', colors.dark, '4%'),
163161
},
164162
},
165-
text: generateColorSteps('#888888', defaultColors.black),
163+
text: generateColorSteps('#888888', '#000000'),
166164
},
167165

168-
backgroundColor: defaultColors.white,
166+
backgroundColor: '#ffffff',
169167
backgroundColorRgb: '255, 255, 255',
170-
textColor: defaultColors.black,
168+
textColor: '#000000',
171169
textColorRgb: '0, 0, 0',
172170
};

0 commit comments

Comments
 (0)