A comprehensive color picker application available in both web and iOS implementations, designed to provide professional-grade color selection tools similar to Adobe Photoshop's color picker.
- Advanced Color Picker: Interactive color selection with square and bar selectors
- Multiple Color Spaces: Support for RGB, HSB, Lab, and CMYK color models
- HTML/CSS Color Matching: Find the closest HTML/CSS named color to any selected color
- Web-Safe Colors: Filter to show only web-safe color palette (216 colors)
- HTML Color Library: Access to all 138 standard HTML color names
- Real-time Color Conversion: Instant conversion between all supported color formats
- WebGL Rendering: High-performance color gradients using WebGL technology
- Native SwiftUI Interface: Modern, responsive iOS design
- Color History: Track and revisit previously selected colors (up to 50 colors)
- Color Information Display: View detailed color information including:
- Color name detection
- Hex values
- RGB values
- HSL values
- Color Converter: Convert between different color formats
- Tabbed Interface: Organized into Color Picker, History, and Converter sections
-
Live Demo: Try the web version at https://ppyne.github.io/colorselector/
-
Local Setup:
cd colorselector-main # Open index.html in your browser (Chrome recommended)
-
Requirements:
- Modern web browser with WebGL support
- Chrome recommended for best compatibility
- Tested primarily on macOS
-
Prerequisites:
- Xcode 12.0 or later
- iOS 14.0 or later
- macOS for development
-
Installation:
# Choose one of the iOS implementations cd ColorSelector/ColorSelector # or cd ColorSelectorFresh # Open the .xcodeproj file in Xcode open ColorSelector.xcodeproj
-
Build and Run:
- Select your target device or simulator
- Press Cmd+R to build and run
colorselector-main/
├── colorselector-main/ # Web implementation
│ ├── index.html # Main web application
│ ├── scripts/ # JavaScript logic
│ │ ├── color.js # Color conversion utilities
│ │ └── colorselector.js # Main color selector logic
│ ├── styles/ # CSS and fonts
│ └── images/ # UI assets
├── ColorSelector/ # Primary iOS implementation
│ └── ColorSelector/
│ ├── ColorSelectorApp.swift
│ ├── ContentView.swift
│ ├── ColorModel.swift
│ ├── ColorPickerView.swift
│ ├── ColorHistoryView.swift
│ └── ColorConverterView.swift
├── ColorSelectorFresh/ # Alternative iOS implementation
└── ColorSelectorIOS/ # Standalone iOS files
-
Color Selection:
- Click and drag in the main color square to select hue and saturation
- Use the vertical bar to adjust brightness/lightness
- Switch between color channels (R, G, B, H, S, B, L, a, b)
-
Color Modes:
- All Colors: Full color spectrum
- Web Colors: 216 web-safe colors only
- HTML Colors: 138 standard HTML named colors only
-
Color Information:
- View RGB, HSB, Lab, and CMYK values
- Get hex color codes
- Find closest HTML color name
-
Color Picker Tab:
- Use the native iOS color picker
- View real-time color information
- Add colors to history
-
History Tab:
- Browse previously selected colors
- Tap to reselect a color
- Automatic timestamp tracking
-
Converter Tab:
- Convert between color formats
- Input colors in various formats
- Export color values
- JavaScript ES6+: Core application logic
- WebGL: High-performance color rendering
- HTML5 Canvas: Interactive color selection
- CSS3: Modern styling and layouts
- jQuery: DOM manipulation and event handling
- SwiftUI: Modern declarative UI framework
- ObservableObject: Reactive data management
- Color Extensions: Advanced color manipulation
- Core Graphics: Color space conversions
- RGB: Red, Green, Blue (0-255)
- HSB/HSV: Hue, Saturation, Brightness (H: 0-360°, S&B: 0-100%)
- Lab: Lightness, a*, b* (CIE Lab color space)
- CMYK: Cyan, Magenta, Yellow, Key/Black (0-100%)
- Hex: Hexadecimal color codes (#RRGGBB)
The web version includes several color space profiles:
- HSB Profile (H) with web colors
- HSB Profile (S) with HTML/CSS colors
- Lab Profile (a) with HTML/CSS colors
- Multiple color selection modes
See the readme_images/
directory for detailed screenshots
- Modify
scripts/colorselector.js
for core functionality - Update
scripts/color.js
for color conversion algorithms - Customize styles in
styles/
directory
- Core logic in
ColorModel.swift
- UI components in individual view files
- Follow SwiftUI best practices for reactive updates
- Modern browser with WebGL support
- JavaScript enabled
- Canvas support
- iOS 14.0+
- Xcode 12.0+
- Swift 5.0+
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly on target platforms
- Submit a pull request
This project is available under the terms specified in the LICENSE file.
- Web version primarily tested on Chrome/macOS
- Some browsers may have WebGL compatibility issues
- iOS versions may have slight differences in color accuracy
- Additional color spaces (XYZ, Luv)
- Color palette generation
- Export functionality for color swatches
- Accessibility improvements
- Cross-platform color sync
- Advanced color harmony tools
Note: This project was originally developed in 2018 and includes both legacy web implementation and modern iOS Swift versions. The web demo remains available for testing and demonstration purposes.