Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ Garnish Public

Garnish helps you pick the ideal colors for text and UI elements in light and dark themes, ensuring ideal contrast and visual harmony based on luminance and brightness

License

Notifications You must be signed in to change notification settings

Aeastr/Garnish

Repository files navigation

Garnish Logo

Garnish

A Swift package that provides intelligent color utilities for accessibility, contrast optimization, and visual harmony.

Swift Version iOS 14.0+ macOS 14.0+ tvOS 14.0+ watchOS 7.0+ visionOS 1.0+ License: MIT

Core Features

Garnish is a comprehensive Swift package that provides intelligent color utilities for accessibility, contrast optimization, and visual harmony.

Auto Contrast Color Math Color Analysis
Auto Contrast Color Math Color Analysis
Automatically generate readable text colors from any background Calculate luminance, brightness, and contrast ratios with WCAG standards Classify colors as light/dark and validate accessibility compliance

Accessibility & WCAG Compliance - Standards Built-in

Ensure your colors meet accessibility requirements:

  • Contrast Optimization - Generate colors that meet WCAG accessibility standards
  • Dynamic Color Adaptation - Colors that work beautifully in light and dark themes
  • Mathematical Color Analysis - Precise luminance, brightness, and contrast calculations
  • Smart Color Generation - Create contrasting shades and optimized color combinations
  • Real-time contrast calculations and accessibility-first color recommendations
  • Font weight optimization for improved readability

Documentation

📖 Complete Documentation available in the Garnish Wiki


Playground Demos

Garnish comes with a bundled demo app that lets you explore Garnish in action. Open the Xcode workspace, select the GarnishPlayground target, and press Run to try it out.

Garnish Base Demo

Garnish Base Demo

Explore the core color utilities with interactive demos for Core API (monochromatic and bi-chromatic contrast generation), Math Utilities (luminance calculations and contrast ratios), Color Extensions (brightness adjustment and hex conversion), Font Weight optimization, and Accessibility compliance checking with WCAG standards.

License

This project is released under the MIT License. See LICENSE for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request! See CONTRIBUTING.md for guidelines.

Support

If you like this project, please consider giving it a ⭐️


Where to find me:


Built with 🍏🎨🌈 by Aether

About

Garnish helps you pick the ideal colors for text and UI elements in light and dark themes, ensuring ideal contrast and visual harmony based on luminance and brightness

Resources

License

Contributing

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors 2

  •  
  •