https://github.com/jonahsnider/frc-colors.com
A web app & API to get the team colors for an FRC team's logo.
https://github.com/jonahsnider/frc-colors.com
api frc nextjs
Last synced: about 1 year ago
JSON representation
A web app & API to get the team colors for an FRC team's logo.
- Host: GitHub
- URL: https://github.com/jonahsnider/frc-colors.com
- Owner: jonahsnider
- License: apache-2.0
- Created: 2023-08-24T04:03:08.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-05-01T03:19:20.000Z (about 1 year ago)
- Last Synced: 2025-05-01T03:24:59.191Z (about 1 year ago)
- Topics: api, frc, nextjs
- Language: TypeScript
- Homepage: https://frc-colors.com
- Size: 4.26 MB
- Stars: 10
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FRC Colors
**[frc-colors.com](https://frc-colors.com)**
A web app & API to get the primary & secondary/accent colors for an FRC team's logo.
Automatically extracts colors from team avatars uploaded to FIRST if verified colors aren't stored in our database.
## API Usage
### Base URL
The API is publicly available at `https://api.frc-colors.com`.
### `GET /v1/team/:teamNumber`
Get the colors for a team by number.
#### Example
`GET /v1/team/581`
```json
{
"teamNumber": 581,
"colors": {
"primaryHex": "#591616",
"secondaryHex": "#e86d38",
"verified": true
}
}
```
### `GET /v1/team`
Get the colors for several teams by number.
#### Example
`GET /v1/team?team=581&team=751&team=9408`
```json
{
"teams": {
"581": {
"teamNumber": 581,
"colors": {
"primaryHex": "#591616",
"secondaryHex": "#e86d38",
"verified": true
}
},
"751": {
"teamNumber": 751,
"colors": null
},
"9408": {
"teamNumber": 9408,
"colors": {
"primaryHex": "#1d2e3b",
"secondaryHex": "#ffffff",
"verified": false
}
}
}
}
```
### `GET /v1/event/:eventCode`
Get the colors for all teams at an event.
#### Example
`GET /v1/event/2023cc`
Same response format as `GET /v1/team`.
### `GET /v1/team?all`
Get the colors for all teams.
#### Example
`GET /v1/team?all`
Same response format as `GET /v1/team`.
## Development
FRC Colors is built with [Next.js](https://nextjs.org/) and uses [Tailwind CSS](https://tailwindcss.com/) for frontend styling.
The backend is built in TypeScript and uses [tRPC](https://trpc.io/) for internal functionality, and [a minimal HTTP server](https://hono.dev/) for the public API.
It uses a PostgreSQL database via [Drizzle ORM](https://orm.drizzle.team/) for persisting data.