Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.

Commit e55878b

Browse files
committed
rename colors
1 parent f0a8d80 commit e55878b

File tree

11 files changed

+46
-40
lines changed

11 files changed

+46
-40
lines changed

src/components/Button/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ export function Button(componentProps: PropsWithChildren<ButtonProps>) {
2323
return (
2424
<Box
2525
AutoButtonColor={false}
26-
BackgroundColor3={hover ? theme.background : theme.primary}
26+
BackgroundColor3={hover ? theme.backgroundPrimary : theme.textPrimary}
2727
BorderRadius={25}
2828
Component="textbutton"
2929
Font={theme.fontBold}
3030
PaddingX={4}
3131
PaddingY={1.5}
32-
TextColor3={hover ? theme.primary : theme.background}
32+
TextColor3={hover ? theme.textPrimary : theme.backgroundPrimary}
3333
TextSize={16}
3434
{...props}
3535
Event={{
@@ -48,7 +48,7 @@ export function Button(componentProps: PropsWithChildren<ButtonProps>) {
4848
>
4949
<uistroke
5050
ApplyStrokeMode={Enum.ApplyStrokeMode.Border}
51-
Color={theme.primary}
51+
Color={theme.textPrimary}
5252
Thickness={hover ? 1 : 0}
5353
{...strokeProps}
5454
/>

src/components/Checkbox/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ export function Checkbox(componentProps: PropsWithChildren<CheckboxProps>) {
4141

4242
return (
4343
<Button
44-
BackgroundColor3={checkboxValue ? theme.accent : theme.overlay}
44+
BackgroundColor3={
45+
checkboxValue ? theme.accentPrimary : theme.backgroundOverlay
46+
}
4547
BorderRadius={4}
4648
DisableListLayout
4749
PaddingX={0}
@@ -60,7 +62,7 @@ export function Checkbox(componentProps: PropsWithChildren<CheckboxProps>) {
6062
}, props.Event?.MouseButton1Click),
6163
}}
6264
StrokeProps={{
63-
Color: checkboxValue ? theme.accent : theme.borders,
65+
Color: checkboxValue ? theme.accentPrimary : theme.bordersPrimary,
6466
Thickness: 2,
6567

6668
...props.StrokeProps,

src/components/Input/index.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,22 @@ export function Input(componentProps: PropsWithChildren<InputProps>) {
2323
return (
2424
<Box
2525
AutomaticSize="Y"
26-
BackgroundColor3={theme.overlay}
27-
BorderColor3={focused && !disabled ? theme.accent : theme.borders}
26+
BackgroundColor3={theme.backgroundOverlay}
27+
BorderColor3={
28+
focused && !disabled ? theme.accentPrimary : theme.bordersPrimary
29+
}
2830
BorderRadius={8}
2931
BorderThickness={2}
3032
ClearTextOnFocus={false}
3133
ClipsDescendants
3234
Component="textbox"
3335
PaddingX={2}
3436
PaddingY={1.5}
35-
PlaceholderColor3={theme.primary60}
37+
PlaceholderColor3={theme.textSecondary}
3638
PlaceholderText=""
3739
Size={UDim2.fromScale(1, 0)}
3840
Text=""
39-
TextColor3={disabled ? theme.primary60 : theme.primary}
41+
TextColor3={disabled ? theme.textSecondary : theme.textPrimary}
4042
TextEditable={!disabled}
4143
TextSize={12}
4244
TextTransparency={disabled ? 0.25 : 0}

src/components/ProgressBar/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export function ProgressBar(
3737

3838
return (
3939
<Box
40-
BackgroundColor3={theme.primary60}
40+
BackgroundColor3={theme.textSecondary}
4141
BackgroundTransparency={0.8}
4242
BorderRadius={borderRadius}
4343
ClipsDescendants
@@ -47,15 +47,15 @@ export function ProgressBar(
4747
>
4848
<Box Component="canvasgroup" Size={UDim2.fromScale(1, 1)}>
4949
<Box
50-
BackgroundColor3={theme.accent}
50+
BackgroundColor3={theme.accentPrimary}
5151
BorderRadius={borderRadius}
5252
ClipsDescendants
5353
HorizontalAlignment={Enum.HorizontalAlignment.Right}
5454
Size={UDim2.fromScale(value / 100, 1)}
5555
{...indicatorProps}
5656
>
5757
<Box
58-
BackgroundColor3={theme.accent}
58+
BackgroundColor3={theme.accentPrimary}
5959
Size={UDim2.fromScale(0.5, 1)}
6060
{...innerIndicatorProps}
6161
/>

src/components/SecondaryButton/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ export function SecondaryButton(
1616

1717
return (
1818
<Button
19-
BackgroundColor3={theme.background}
20-
TextColor3={theme.primary}
19+
BackgroundColor3={theme.backgroundPrimary}
20+
TextColor3={theme.textPrimary}
2121
{...props}
2222
Event={{
2323
...props.Event,
@@ -34,7 +34,7 @@ export function SecondaryButton(
3434
}}
3535
StrokeProps={mergeProps(
3636
{
37-
Color: hover ? theme.primary : theme.primary60,
37+
Color: hover ? theme.textPrimary : theme.textSecondary,
3838
Thickness: 1,
3939
},
4040
props.StrokeProps,

src/components/Sheet/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ export function Sheet(componentProps: PropsWithChildren<SheetProps>) {
1515

1616
const props = componentProps;
1717

18-
const background = props.Background ? theme.background : theme.overlay;
18+
const background = props.Background
19+
? theme.backgroundPrimary
20+
: theme.backgroundOverlay;
1921
props.Background = undefined;
2022

2123
return <Box BackgroundColor3={background} {...props} />;

src/components/Slider/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export function Slider(componentProps: PropsWithChildren<SliderProps>) {
7575
)}
7676

7777
<ProgressBar
78-
BackgroundColor3={theme.accent}
78+
BackgroundColor3={theme.accentPrimary}
7979
Size={UDim2.fromScale(1, 1)}
8080
Value={!value ? internalValue : value}
8181
{...progressBarProps}
@@ -84,7 +84,7 @@ export function Slider(componentProps: PropsWithChildren<SliderProps>) {
8484
<Box
8585
AnchorPoint={new Vector2(0.25, 0.25)}
8686
AutoButtonColor={false}
87-
BackgroundColor3={theme.accent}
87+
BackgroundColor3={theme.accentPrimary}
8888
Component="textbutton"
8989
Position={new UDim2(internalValue / 100, 0, -0, 0)}
9090
Size={UDim2.fromOffset(16, 16)}

src/components/Typography/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export function Typography(props: PropsWithChildren<TypographyProps>) {
1414
return (
1515
<Box
1616
Component="textlabel"
17-
TextColor3={theme.primary}
17+
TextColor3={theme.textPrimary}
1818
TextSize={12}
1919
TextXAlignment={Enum.TextXAlignment.Left}
2020
{...props}

src/themes/dark.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import type { Theme } from 'themes';
22

33
export const darkTheme: Theme = {
4-
primary: Color3.fromRGB(250, 250, 250),
5-
primary60: Color3.fromRGB(160, 160, 161),
6-
background: Color3.fromRGB(24, 26, 27),
7-
overlay: Color3.fromRGB(28, 30, 34),
8-
borders: Color3.fromRGB(38, 41, 45),
9-
accent: Color3.fromRGB(67, 147, 228),
10-
font: Enum.Font.Arial,
4+
textPrimary: Color3.fromRGB(250, 250, 250),
5+
textSecondary: Color3.fromRGB(160, 160, 161),
6+
backgroundPrimary: Color3.fromRGB(24, 26, 27),
7+
backgroundOverlay: Color3.fromRGB(28, 30, 34),
8+
bordersPrimary: Color3.fromRGB(38, 41, 45),
9+
accentPrimary: Color3.fromRGB(67, 147, 228),
10+
fontRegular: Enum.Font.Arial,
1111
fontBold: Enum.Font.ArialBold,
1212
};

src/themes/index.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
export interface Theme {
2-
primary: Color3;
3-
primary60: Color3;
4-
background: Color3;
5-
overlay: Color3;
6-
borders: Color3;
7-
accent: Color3;
8-
font: Enum.Font;
2+
textPrimary: Color3;
3+
textSecondary: Color3;
4+
backgroundPrimary: Color3;
5+
backgroundOverlay: Color3;
6+
bordersPrimary: Color3;
7+
accentPrimary: Color3;
8+
fontRegular: Enum.Font;
99
fontBold: Enum.Font;
1010
}
1111

0 commit comments

Comments
 (0)