An open API service indexing awesome lists of open source software.

https://github.com/Innei/apple-uikit-colors


https://github.com/Innei/apple-uikit-colors

Last synced: 8 months ago
JSON representation

Awesome Lists containing this project

README

          

# Apple UIKit Colors

Accurate Apple UIKit color system for iOS and macOS with comprehensive platform support. This monorepo provides native Apple colors for TypeScript, React Native, and Tailwind CSS with automatic light/dark mode switching.

## ๐Ÿ“ฆ Packages

| Package | Description | Platform Support |
|---------|-------------|-------------------|
| **[apple-uikit-colors](./packages/uikit-colors)** | Core UIKit colors in TypeScript | Universal |
| **[react-native-uikit-colors](./packages/react-native-uikit-colors)** | React Native bindings with NativeWind integration | iOS, Android, Web |
| **[tailwindcss-uikit-colors](./packages/tailwindcss-uikit-colors)** | Tailwind CSS plugin with v3 & v4 support | Web, React Native Web |

## โœจ Features

- ๐ŸŽจ **Authentic Apple Colors** - Pixel-perfect iOS and macOS system colors
- ๐ŸŒ“ **Automatic Dark Mode** - Colors adapt to system theme preferences
- ๐Ÿ”„ **Cross-Platform** - Works on iOS, Android, Web, and React Native
- ๐ŸŽฏ **TypeScript Ready** - Full type safety and IntelliSense support
- โšก **Multiple Integration Options** - Hooks, CSS variables, Tailwind classes
- ๐ŸŽช **Tailwind CSS v3 & v4** - Support for both current and next-gen Tailwind

## ๐Ÿš€ Quick Start

### For React Native Projects

```bash
npm install react-native-uikit-colors
```

```tsx
import { useColor } from 'react-native-uikit-colors'

function MyComponent() {
const backgroundColor = useColor('systemBackground')
const textColor = useColor('label')

return (

Hello World

)
}
```

### For Tailwind CSS Projects

```bash
npm install tailwindcss-uikit-colors
```

```js
// tailwind.config.js
import { withUIKit } from 'tailwindcss-uikit-colors'

export default withUIKit({
content: ['./src/**/*.{js,jsx,ts,tsx}'],
// ... your config
})
```

```css
/* Import colors CSS */
@import 'tailwindcss-uikit-colors/selector.css';
```

```html


Hello World



```

### For TypeScript Projects

```bash
npm install apple-uikit-colors
```

```ts
import { lightPalette, darkPalette } from 'apple-uikit-colors'

const theme = {
light: lightPalette,
dark: darkPalette
}
```

## ๐ŸŽจ Available Colors

### System Colors
- Background: `system-background`, `secondary-system-background`, `tertiary-system-background`
- Grouped: `system-grouped-background`, `secondary-system-grouped-background`, `tertiary-system-grouped-background`
- Labels: `label`, `secondary-label`, `tertiary-label`, `quaternary-label`
- Fills: `system-fill`, `secondary-system-fill`, `tertiary-system-fill`, `quaternary-system-fill`
- Separators: `separator`, `opaque-separator`, `non-opaque-separator`

### Semantic Colors
- Core: `red`, `orange`, `yellow`, `green`, `mint`, `teal`, `cyan`, `blue`, `indigo`, `purple`, `pink`, `brown`
- Grays: `gray`, `gray2`, `gray3`, `gray4`, `gray5`, `gray6`
- Interactive: `link`, `placeholder-text`

### Platform-Specific Colors
- **iOS**: Complete iOS system color palette
- **macOS**: Extended macOS colors including vibrant fills, materials, and controls

## ๐Ÿ”ง Advanced Usage

### React Native with NativeWind

```tsx
import { withUIKit } from 'react-native-uikit-colors/tailwind'
import { useCurrentColorsVariants } from 'react-native-uikit-colors'

// Configure Tailwind
export default withUIKit({
content: ['./src/**/*.{js,jsx,ts,tsx}']
})

// Use in components
function App() {
const currentThemeColors = useCurrentColorsVariants()

return (

Native + Web

)
}
```

### Tailwind CSS v4

```css
/* Import v4 colors */
@import 'tailwindcss-uikit-colors/v4/ios.css';
/* or */
@import 'tailwindcss-uikit-colors/v4/macos.css';
```

### Dynamic Color Updates

```tsx
import { useColor, useColorScheme } from 'react-native-uikit-colors'

function ThemedComponent() {
const { colorScheme } = useColorScheme()
const backgroundColor = useColor('systemBackground')

// Colors automatically update when system theme changes
return (

Current theme: {colorScheme}

)
}
```

## ๐Ÿ—๏ธ Architecture

This monorepo uses a clean dependency hierarchy:

```
apple-uikit-colors (core)
โ”œโ”€โ”€ react-native-uikit-colors (depends on core + tailwind)
โ””โ”€โ”€ tailwindcss-uikit-colors (depends on core)
```

Colors are stored as space-separated RGB values (`"255 59 48"`) for optimal compatibility with modern CSS color functions and alpha compositing.

## ๐Ÿ“š Documentation

- [React Native Package](./packages/react-native-uikit-colors/readme.md)
- [Tailwind CSS Package](./packages/tailwindcss-uikit-colors/readme.md)
- [Tailwind CSS v4 Guide](./packages/tailwindcss-uikit-colors/TAILWIND_V4.md)
- [API Reference](./docs/api.md)

## ๐Ÿค Contributing

Contributions are welcome! Please read our [contributing guide](./CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests.

## ๐Ÿ“„ License

2025 ยฉ Innei, Released under the MIT License.

> [Personal Website](https://innei.in/) ยท GitHub [@Innei](https://github.com/innei/)