Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update colors #816

Merged
merged 1 commit into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .storybook/image-snapshots/expected/components_Filters_Default.png
Binary file modified .storybook/image-snapshots/expected/components_Tabs_Text Tabs.png
Binary file modified .storybook/image-snapshots/expected/components_Tooltip_Width.png
2 changes: 1 addition & 1 deletion src/theme/DSProvider/DSProvider.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('DSProvider', () => {
renderComponent();
const button = screen.getByRole('button');

expect(button).toHaveStyleRule('background', '#f0ecfe');
expect(button).toHaveStyleRule('background', '#E7F0FF');
expect(button).toHaveStyleRule('color', '#2a2a2a');
});

Expand Down
57 changes: 30 additions & 27 deletions src/theme/colors.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
const primary = {
50: '#f0ecfe',
100: '#e5dffd',
200: '#cabdfb',
300: '#a995f4',
400: '#8263f5',
500: '#6641f3',
600: '#4d29d4',
700: '#3b1ab7',
800: '#2c1193',
900: '#1b0471',
50: '#E7F0FF',
100: '#D3E4FF',
200: '#B4D0FF',
300: '#81B0FF',
400: '#3E85FA',
500: '#1163EA',
600: '#014FCF',
700: '#003B9D',
800: '#002B72',
900: '#001A45',
};

const neutral = {
Expand All @@ -26,13 +26,16 @@ const neutral = {
};

const info = {
50: '#f0ecfe',
100: '#dad1fc',
500: '#6641f3',
600: '#5433d2',
700: '#41299a',
800: '#26146D',
900: '#160944',
50: '#E7F0FF',
100: '#D3E4FF',
200: '#B4D0FF',
300: '#81B0FF',
400: '#3E85FA',
500: '#1163EA',
600: '#014FCF',
700: '#003B9D',
800: '#002B72',
900: '#001A45',
};

const success = {
Expand Down Expand Up @@ -66,11 +69,11 @@ const error = {
};

const grade = {
A: '#4aba00',
B: '#e5bd00',
C: '#f08f00',
D: '#f1431c',
F: '#b40000',
A: '#4BBA76',
B: '#FFB147',
C: '#FB7A4F',
D: '#F32E43',
F: '#B81143',
};

const brand = {
Expand All @@ -91,11 +94,11 @@ const brandSecondary = {
} as const;

const severity = {
informational: '#0275D8',
positive: '#49A25A',
low: '#E4BE00',
medium: '#E5883C',
high: '#B21F24',
informational: '#5580D7',
positive: '#4BBA76',
low: '#FFB147',
medium: '#FB7A4F',
high: '#F32E43',
};

export const colors = {
Expand Down
50 changes: 25 additions & 25 deletions src/utils/helpers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@ describe('abbreviateNumber', () => {

describe('getColor', () => {
it('should return correct color for current keys', () => {
expect(getColor(ColorTypes.primary900, { theme })).toBe('#1b0471');
expect(getColor(ColorTypes.primary800, { theme })).toBe('#2c1193');
expect(getColor(ColorTypes.primary700, { theme })).toBe('#3b1ab7');
expect(getColor(ColorTypes.primary600, { theme })).toBe('#4d29d4');
expect(getColor(ColorTypes.primary500, { theme })).toBe('#6641f3');
expect(getColor(ColorTypes.primary400, { theme })).toBe('#8263f5');
expect(getColor(ColorTypes.primary300, { theme })).toBe('#a995f4');
expect(getColor(ColorTypes.primary200, { theme })).toBe('#cabdfb');
expect(getColor(ColorTypes.primary100, { theme })).toBe('#e5dffd');
expect(getColor(ColorTypes.primary50, { theme })).toBe('#f0ecfe');
expect(getColor(ColorTypes.primary900, { theme })).toBe('#001A45');
expect(getColor(ColorTypes.primary800, { theme })).toBe('#002B72');
expect(getColor(ColorTypes.primary700, { theme })).toBe('#003B9D');
expect(getColor(ColorTypes.primary600, { theme })).toBe('#014FCF');
expect(getColor(ColorTypes.primary500, { theme })).toBe('#1163EA');
expect(getColor(ColorTypes.primary400, { theme })).toBe('#3E85FA');
expect(getColor(ColorTypes.primary300, { theme })).toBe('#81B0FF');
expect(getColor(ColorTypes.primary200, { theme })).toBe('#B4D0FF');
expect(getColor(ColorTypes.primary100, { theme })).toBe('#D3E4FF');
expect(getColor(ColorTypes.primary50, { theme })).toBe('#E7F0FF');
expect(getColor(ColorTypes.neutral1000, { theme })).toBe('#000');
expect(getColor(ColorTypes.neutral900, { theme })).toBe('#2a2a2a');
expect(getColor(ColorTypes.neutral800, { theme })).toBe('#555555');
Expand All @@ -63,11 +63,11 @@ describe('getColor', () => {
expect(getColor(ColorTypes.neutral200, { theme })).toBe('#f3f3f3');
expect(getColor(ColorTypes.neutral100, { theme })).toBe('#f9f9f9');
expect(getColor(ColorTypes.neutral0, { theme })).toBe('#fff');
expect(getColor(ColorTypes.info50, { theme })).toBe('#f0ecfe');
expect(getColor(ColorTypes.info100, { theme })).toBe('#dad1fc');
expect(getColor(ColorTypes.info500, { theme })).toBe('#6641f3');
expect(getColor(ColorTypes.info600, { theme })).toBe('#5433d2');
expect(getColor(ColorTypes.info700, { theme })).toBe('#41299a');
expect(getColor(ColorTypes.info50, { theme })).toBe('#E7F0FF');
expect(getColor(ColorTypes.info100, { theme })).toBe('#D3E4FF');
expect(getColor(ColorTypes.info500, { theme })).toBe('#1163EA');
expect(getColor(ColorTypes.info600, { theme })).toBe('#014FCF');
expect(getColor(ColorTypes.info700, { theme })).toBe('#003B9D');
expect(getColor(ColorTypes.success50, { theme })).toBe('#edf6ef');
expect(getColor(ColorTypes.success100, { theme })).toBe('#d3e9d7');
expect(getColor(ColorTypes.success500, { theme })).toBe('#49a25a');
Expand All @@ -83,18 +83,18 @@ describe('getColor', () => {
expect(getColor(ColorTypes.error500, { theme })).toBe('#b21f24');
expect(getColor(ColorTypes.error600, { theme })).toBe('#971a1f');
expect(getColor(ColorTypes.error700, { theme })).toBe('#7e161a');
expect(getColor(ColorTypes.gradeA, { theme })).toBe('#4aba00');
expect(getColor(ColorTypes.gradeB, { theme })).toBe('#e5bd00');
expect(getColor(ColorTypes.gradeC, { theme })).toBe('#f08f00');
expect(getColor(ColorTypes.gradeD, { theme })).toBe('#f1431c');
expect(getColor(ColorTypes.gradeF, { theme })).toBe('#b40000');
expect(getColor(ColorTypes.gradeA, { theme })).toBe('#4BBA76');
expect(getColor(ColorTypes.gradeB, { theme })).toBe('#FFB147');
expect(getColor(ColorTypes.gradeC, { theme })).toBe('#FB7A4F');
expect(getColor(ColorTypes.gradeD, { theme })).toBe('#F32E43');
expect(getColor(ColorTypes.gradeF, { theme })).toBe('#B81143');
expect(getColor(ColorTypes.severityInformational, { theme })).toBe(
'#0275D8',
'#5580D7',
);
expect(getColor(ColorTypes.severityPositive, { theme })).toBe('#49A25A');
expect(getColor(ColorTypes.severityLow, { theme })).toBe('#E4BE00');
expect(getColor(ColorTypes.severityMedium, { theme })).toBe('#E5883C');
expect(getColor(ColorTypes.severityHigh, { theme })).toBe('#B21F24');
expect(getColor(ColorTypes.severityPositive, { theme })).toBe('#4BBA76');
expect(getColor(ColorTypes.severityLow, { theme })).toBe('#FFB147');
expect(getColor(ColorTypes.severityMedium, { theme })).toBe('#FB7A4F');
expect(getColor(ColorTypes.severityHigh, { theme })).toBe('#F32E43');
});
});

Expand Down