Skip to content

Commit

Permalink
added invokePurple to colors (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
chainchompa authored Aug 15, 2024
1 parent 4430c34 commit a57650e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/components/button/button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const meta: Meta<typeof Button> = {
export default meta;
type Story = StoryObj<typeof Button>;

const colorSchemes = ['base', 'invokeYellow', 'invokeRed', 'invokeGreen', 'invokeBlue'] as const;
const colorSchemes = ['base', 'invokeYellow', 'invokeRed', 'invokeGreen', 'invokeBlue', 'invokePurple'] as const;
const variants = ['solid', 'outline', 'ghost', 'link'] as const;
const sizes = ['xs', 'sm', 'md', 'lg'] as const;

Expand Down
5 changes: 5 additions & 0 deletions lib/theme/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ export type ThemeColors = {
invokeGreenAlpha: PaletteSteps;
invokeBlue: PaletteSteps;
invokeBlueAlpha: PaletteSteps;
invokePurple: PaletteSteps;
invokePurpleAlpha: PaletteSteps;
};

const brandColors = {
Expand All @@ -58,6 +60,7 @@ const brandColors = {
invokeBlue: { H: 200, S: 76 },
invokeGreen: { H: 110, S: 69 },
invokeRed: { H: 16, S: 92 },
invokePurple: { H: 260, S: 58 },
};

export const getArbitraryBaseColor = (lightness: number) =>
Expand All @@ -84,4 +87,6 @@ export const colors: ThemeColors = {
invokeGreenAlpha: generateColorPalette(brandColors.invokeGreen.H, brandColors.invokeGreen.S, true),
invokeRed: generateColorPalette(brandColors.invokeRed.H, brandColors.invokeRed.S),
invokeRedAlpha: generateColorPalette(brandColors.invokeRed.H, brandColors.invokeRed.S, true),
invokePurple: generateColorPalette(brandColors.invokePurple.H, brandColors.invokePurple.S),
invokePurpleAlpha: generateColorPalette(brandColors.invokePurple.H, brandColors.invokePurple.S, true),
};

0 comments on commit a57650e

Please sign in to comment.