{"id":910,"url":"https://github.com/burhanuddin353/TFTColor","last_synced_at":"2025-07-30T19:33:01.512Z","repository":{"id":23435753,"uuid":"26798948","full_name":"burhanuddin353/TFTColor","owner":"burhanuddin353","description":"A simple UIColor category to get color with hex code.","archived":false,"fork":false,"pushed_at":"2021-11-04T06:54:20.000Z","size":218,"stargazers_count":19,"open_issues_count":1,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-07T03:49:23.607Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/burhanuddin353.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-18T08:13:35.000Z","updated_at":"2023-08-20T12:55:39.000Z","dependencies_parsed_at":"2022-07-08T07:08:41.061Z","dependency_job_id":null,"html_url":"https://github.com/burhanuddin353/TFTColor","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burhanuddin353%2FTFTColor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burhanuddin353%2FTFTColor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burhanuddin353%2FTFTColor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burhanuddin353%2FTFTColor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/burhanuddin353","download_url":"https://codeload.github.com/burhanuddin353/TFTColor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228179016,"owners_count":17881123,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-01-05T20:15:34.441Z","updated_at":"2024-12-04T19:32:22.081Z","avatar_url":"https://github.com/burhanuddin353.png","language":"Swift","funding_links":[],"categories":["Color"],"sub_categories":["Linter","Other free courses"],"readme":"# TFTColor\nA simple UIColor library to get UIColor object from RGB hex string/value, CMYK hex string/value or CMYK base component values. \nYou can also retrieve back RGB hex string/value, CMYK hex string/value.\n\n[![Awesome iOS][awesome-ios-image]][awesome-ios-url]\n[![Swift Version][swift-image]][swift-url]\n[![Objective C][objc-image]][objc-url]\n[![License][license-image]][license-url]\n[![DOI](https://zenodo.org/badge/26798948.svg)](https://zenodo.org/badge/latestdoi/26798948)\n[![Build Status](https://travis-ci.org/burhanuddin353/TFTColor.svg?branch=master)](https://travis-ci.org/burhanuddin353/TFTColor)\n\n\u003cimg src=\"https://github.com/burhanuddin353/TFTColor/blob/master/Example.png\" width=\"375\"\u003e\n\nYou can support me here https://linktr.ee/burhanuddin353\n\n## Features\n\n- [x] Convert RGB Hex String/Value to UIColor\n- [x] Convert CMYK Hex String/Value to UIColor\n- [x] Get RGB Hex String/Value from UIColor\n- [x] Get CMYK Hex String/Value from UIColor\n- [x] Initialize CMYK from its base components\n\n\n* The beautiful part of this library is that you can input Hex values with `#`, `0x` or `0X` and the it will take care of this.\n* Also you can input hex value of any length and this will be handled.\n* The library also takes care of non-hex characters.\n\n#### Supporting Formats for RGB Hex Strings:\n1. **#B**\n2. **#BB**\n3. **#RGB**\n4. **#GGBB**\n5. **#RGGBB**\n6. **#RRGGBB** \n\n#### Supporting Formats for CMYK Hex Strings:\n1. **#K**\n2. **#KK**\n3. **#YKK**\n4. **#CMYK**\n5. **#MYYKK**\n6. **#MMYYKK**\n7. **#CMMYYKK**\n8. **#CCMMYYKK**\n\n## Requirements\n\n- iOS 8.0+\n- Xcode 7.3+\n\n## Installation\n\n#### CocoaPods\nYou can use [CocoaPods](http://cocoapods.org/) to install `TFTColor` by adding it to your `Podfile`:\n\n```ruby\nplatform :ios, '9.0'\nuse_frameworks!\n\ntarget 'YourApp' do\n    pod 'TFTColor'\nend\n```\n\nThen, run the following command:\n\n``` ruby\n$ pod install\n```\n\n#### Manually\n**Swift**\n\n1. Download and drop ```TFTColor.swift``` in your project.  \n\n**Objective-C**\n\n1. Download and drop ```TFTColor.h``` \u0026 ```TFTColor.m``` in your project. \n2. Congratulations! \n\n\n## Usage example\n**Swift**\n\n```swift\nimport TFTColor\n\n// UIColor from RGB Hex String\nUIColor(rgbHexString: \"FF34AE\", alpha: 1.0)\nUIColor(rgbHexString: \"#ea\", alpha: 1.0)\n\n// UIColor from RGB Hex Value\nUIColor(rgbHexValue: 0xFF34AE alpha: 1.0)\n\n// RGB Hex String from UIColor\nlet redColor = UIColor.redColor\nredColor.rgbHexString //\"FF0000\"\n\n// RGB Hex Value from UIColor\nredColor.rgbHexValue //0xFF0000\n\n// UIColor from CMYK component values \n// Creates and returns a color object using the specified opacity and CMYK component values.\n// The components of the color object, specified as a value from 0.0 to 1.0.\nUIColor(cyan:0.5, magenta: 0.5, yellow: 0.5, black: 0.5, alpha: 1.0)\n\n// UIColor from CMYK Hex String\nUIColor(cmykHexString: \"FF34AE34\", alpha:1.0)\nUIColor(cmykHexString: \"#ea\", alpha:1.0)\n\n// UIColor from CMYK Hex Value\nUIColor(cmykHexValue: 0xFF34AE34 alpha:1.0)\n\n// CMYK Hex String from UIColor\nredColor.cmykHexString //\"00646400\"\n\n// CMYK Hex Value from UIColor\nredColor.cmykHexValue //0x00646400\n``` \n\n**Objective-C**\n\n```objc\n// UIColor from RGB Hex String\n[UIColor colorWithRGBHexString:@\"FF34AE\" alpha:1.0f];\n[UIColor colorWithRGBHexString:@\"#ea\" alpha:1.0f];\n\n// UIColor from RGB Hex Value\n[UIColor colorWithRGBHexValue:0xFF34AE alpha:1.0f];\n \n// RGB Hex String from UIColor\n[UIColor rgbHexStringForColor:[UIColor redColor]]; //@\"FF0000\"\n \n// RGB Hex Value from UIColor\n[UIColor rgbHexValueForColor:[UIColor redColor]]; //0xFF0000\n\n// UIColor from CMYK component values\n// Creates and returns a color object using the specified opacity and CMYK component values.\n// The components of the color object, specified as a value from 0.0 to 1.0.\n[UIColor colorWithCyan:0.5f magenta:0.5 yellow:0.5f black:0.5f alpha:1.0f];\n\n// UIColor from CMYK Hex String\n[UIColor colorWithCMYKHexString:@\"FF34AE34\" alpha:1.0f];\n[UIColor colorWithCMYKHexString:@\"#EA\" alpha:1.0f]; \n\n// UIColor from CMYK Hex Value\n[UIColor colorWithCMYKHexValue:0xFF34AE34 alpha:1.0f];\n\n// CMYK Hex String from UIColor\n[UIColor cmykHexStringForColor:[UIColor redColor]]; //\"00646400\" \n\n// CMYK Hex Value from UIColor\n[UIColor cmykHexValueForColor:[UIColor redColor]]; //0x00646400\n``` \n\n## Contribute\n\nWe would love for you to contribute to **TFTColor**, check the ``LICENSE`` file for more info.\n\n## Meta\n\nBurhanuddin Sunelwala – [@burhanuddin353](https://twitter.com/burhanuddin353) – burhanuddin353@gmail.com\n\nDistributed under the **The MIT License (MIT)** license. See ``LICENSE`` for more information.\n\n[https://github.com/burhanuddin353/TFTColor](https://github.com/burhanuddin353/TFTColor)\n\n[swift-image]: https://img.shields.io/badge/swift-3.0-orange.svg\n[swift-url]: https://swift.org/\n[objc-image]: https://img.shields.io/badge/Objective-C-purple.svg\n[objc-url]: https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/Introduction/Introduction.html\n[license-image]: https://img.shields.io/badge/License-MIT-blue.svg\n[license-url]: https://github.com/burhanuddin353/TFTColor/blob/master/LICENSE\n[travis-image]: https://img.shields.io/travis/dbader/node-datadog-metrics/master.svg?style=flat-square\n[travis-url]: https://travis-ci.org/dbader/node-datadog-metrics\n[codebeat-image]: https://codebeat.co/badges/c19b47ea-2f9d-45df-8458-b2d952fe9dad\n[codebeat-url]: https://codebeat.co/projects/github-com-vsouza-awesomeios-com\n[awesome-ios-image]: https://img.shields.io/badge/Awesome-iOS-blue.svg\n[awesome-ios-url]: https://github.com/vsouza/awesome-ios\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fburhanuddin353%2FTFTColor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fburhanuddin353%2FTFTColor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fburhanuddin353%2FTFTColor/lists"}