Code Monkey home page Code Monkey logo

ios-rgb's Introduction

SwiftUI RGB to Hex Converter

ios RGB to HEX app home screenshot

A native iOS application written using SwiftUI that allows users to convert RGB color values to Hex and vice-versa.

Features

  • RGB to Hex Conversion: Users can input Red, Green, and Blue values using sliders and see the changes reflected in the color preview. The app also displays the corresponding Hex value.

  • Hex to RGB Conversion: Users can enter a Hex value and see the color preview as well as the equivalent RGB values.

  • Input Validation: The app restricts text input to Hex alphabets (A-F) and digits. It accepts only 3-digit, 4-digit, 6-digit, and 8-digit Hex inputs. Error handling is implemented for any other input range or empty input.

  • Size Class Support: The app utilizes Size classes to support both Portrait and Landscape modes on iPhones as well as iPads. The user interface adapts seamlessly to different device orientations.

  • MVVM Architecture: The app is built using the Model-View-ViewModel (MVVM) architectural pattern, keeping the code modular and the views clean. This separation of concerns allows for easier testing, maintenance, and scalability.

Screenshots

Hex to RGB Conversion

ios app HEX to RGB conversion screenshot dark mode ios  app HEX to RGB conversion screenshot light mode

RGB to Conversion

ios app RGB to HEX conversion screenshot dark mode ios app RGB to HEX conversion screenshot dark mode

Input Validation

ios app input error screenshot dark mode ios app input error screenshot light mode

Landscape mode

landscape mode of iOS app

Installation

To install the RGB to Hex Converter app, follow these steps:

  1. Clone the repository: git clone https://github.com/maha0134/ios-RGB.git
  2. Open the project in Xcode.
  3. Build and run the app on a simulator or a physical device.
  4. Start converting RGB and Hex values effortlessly.

Requirements

  • iOS 14.0+
  • Xcode 12.0+

Dependencies

No external dependencies are required for this app.

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request. Your feedback is valuable in making the RGB to Hex Converter app even better.

Acknowledgment

  • To my professors for the idea as well the approach and rgb to Hex helper function.

ios-rgb's People

Contributors

maha0134 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.