| 1 | --- |
| 2 | name: Extension Color Themes |
| 3 | description: Guidelines for using theme colors in GUI components |
| 4 | alwaysApply: false |
| 5 | globs: "gui/**/*.tsx" |
| 6 | --- |
| 7 | |
| 8 | When adding colors to components, use tailwind color classes. |
| 9 | Do NOT use explicit colors like text-gray-400. Instead, use theme colors. |
| 10 | |
| 11 | ## Available theme colors |
| 12 | |
| 13 | ### Normal text |
| 14 | |
| 15 | - `foreground`, `description`, `description-muted` |
| 16 | |
| 17 | ### Other text, icons, etc |
| 18 | |
| 19 | - `success`, `warning`, `error`, `accent`, `link` |
| 20 | |
| 21 | ### General components |
| 22 | |
| 23 | - `background`, `border`, `border-focus` |
| 24 | |
| 25 | ### Specific components |
| 26 | |
| 27 | #### Button |
| 28 | |
| 29 | - `primary`, `primary-foreground`, `primary-hover` |
| 30 | - `secondary`, `secondary-foreground`, `secondary-hover` |
| 31 | |
| 32 | #### Input |
| 33 | |
| 34 | - `input`, `input-foreground`, `input-border`, `input-placeholder` |
| 35 | |
| 36 | #### Badge |
| 37 | |
| 38 | - `badge`, `badge-foreground` |
| 39 | |
| 40 | #### List/Dropdown items |
| 41 | |
| 42 | - `list-hover`, `list-active`, `list-active-foreground` |
| 43 | |
| 44 | #### Code Editor |
| 45 | |
| 46 | - `editor`, `editor-foreground` |
| 47 | |
| 48 | ## Usage examples |
| 49 | |
| 50 | Any of these colors can be used in tailwind classes: |
| 51 | |
| 52 | - `bg-primary` |
| 53 | - `text-success` |
| 54 | - `border-error` |
| 55 | - `hover:bg-list-hover` |
| 56 | |
| 57 | ## Excluded colors |
| 58 | |
| 59 | The following less-used colors are excluded from this guide: |
| 60 | |
| 61 | - Command (only used by tip-tap): `command`, `command-foreground`, `command-border`, `command-border-focus` |
| 62 | - Find widget colors: `find-match`, `find-match-selected` |
| 63 | - `table-oddRow` |