Skip to content

Commit 968caa1

Browse files
fix: correct color keys to match Todoist backend (turquoise→teal, gray→grey)
The SDK defined color keys 'turquoise' and 'gray' which don't exist in the backend — the Sync and REST APIs expect 'teal' and 'grey' respectively. Sending the old keys results in INVALID_COLOR errors. Deprecated aliases are preserved for backward compatibility of JS imports. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent af0077e commit 968caa1

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

src/utils/colors.ts

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ export const mintGreen = {
6464
hexValue: '#6accbc',
6565
value: '#6accbc',
6666
} as const
67-
export const turquoise = {
67+
export const teal = {
6868
id: 38,
69-
key: 'turquoise',
70-
displayName: 'Turquoise',
71-
name: 'Turquoise',
69+
key: 'teal',
70+
displayName: 'Teal',
71+
name: 'Teal',
7272
hexValue: '#158fad',
7373
value: '#158fad',
7474
} as const
@@ -144,11 +144,11 @@ export const charcoal = {
144144
hexValue: '#808080',
145145
value: '#808080',
146146
} as const
147-
export const gray = {
147+
export const grey = {
148148
id: 48,
149-
key: 'gray',
150-
displayName: 'Gray',
151-
name: 'Gray',
149+
key: 'grey',
150+
displayName: 'Grey',
151+
name: 'Grey',
152152
hexValue: '#b8b8b8',
153153
value: '#b8b8b8',
154154
} as const
@@ -170,7 +170,7 @@ export const colors = [
170170
limeGreen,
171171
green,
172172
mintGreen,
173-
turquoise,
173+
teal,
174174
skyBlue,
175175
lightBlue,
176176
blue,
@@ -180,10 +180,16 @@ export const colors = [
180180
magenta,
181181
salmon,
182182
charcoal,
183-
gray,
183+
grey,
184184
taupe,
185185
] as const
186186

187+
/** @deprecated Use {@link teal} instead. Will be removed in the next major version. */
188+
export const turquoise = teal
189+
190+
/** @deprecated Use {@link grey} instead. Will be removed in the next major version. */
191+
export const gray = grey
192+
187193
export type ColorKey = (typeof colors)[number]['key']
188194

189195
export const defaultColor: Color = charcoal

0 commit comments

Comments
 (0)