Giter VIP home page Giter VIP logo

whichcolor's Introduction

Whichcolor

A simple C program that allows users to select a pixel on the screen and retrieve its color information on Linux using Xorg.

Features

  • Allows users to drag the mouse and select a pixel on the screen
  • Retrieves the color information of the selected pixel
  • Displays the color in RGB and HEX formats
  • Can be installed globally for easy access from anywhere in the terminal

Requirements

  • Linux operating system with Xorg
  • GCC compiler
  • Xlib library

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/color-picker.git
    
  2. Navigate to the project directory:

    cd color-picker
    
  3. Install the necessary dependencies. On Ubuntu or Debian-based systems, run:

    sudo apt install libx11-dev
    

    On Arch-based systems, run:

    sudo pacman -S libx11
    
  4. Build the program:

    make
    
  5. Install the program globally:

    sudo make install
    

    This will copy the compiled binary to /usr/local/bin, allowing you to run the program from anywhere in the terminal.

Usage

  1. Run the program from anywhere in the terminal:

    whichcolor
    
  2. The program will grab the mouse pointer. Drag the mouse to the desired pixel on the screen.

  3. Click the left mouse button to select the pixel.

  4. The program will display the color information for the selected pixel, including RGB values and HEX code.

  5. To copy the HEX code to the clipboard, run the program with the -c option:

    whichcolor -c
    

Uninstallation

To uninstall the program, navigate to the project directory and run:

sudo make uninstall

This will remove the program from /usr/local/bin.

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Make your changes and commit them with descriptive commit messages.
  4. Push your changes to your forked repository.
  5. Submit a pull request to the main repository.

Please ensure that your code follows the project's coding style and conventions.

License

This project is licensed under the MIT License.

Acknowledgments

  • Xlib - The X Window System library used in this project.
  • GCC - The GNU Compiler Collection used to compile the program.

Contact

If you have any questions, suggestions, or feedback, please feel free to contact the project maintainer:


whichcolor's People

Contributors

rxmmah avatar

Stargazers

 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.