Coder Social home page Coder Social logo

color-palettes's Introduction

Current Color Palettes

Name macOS CLR Adobe ASE Adobe ACO
AWS 2021 CLR ASE ACO
Apple CLR ASE ACO

About

This tool will do, via a handler, the following:

  • it will sort colors in a file, based on one of the supported algorithms;
  • it will convert the input file between HEX, RGB and HSL formats;
  • it will pack a HEX, RGB or HSL format into ACO and ASE formats;
  • it will unpack an ASE or ACO file into any of the HEX, RGB or HSL formats.

Install requirements:

python3 -m pip install -r requirements.txt

Due to pyobjc dependency, this script will work only MacOS.

Usage:

color_tool.py --help
usage: color_tool.py [-h] {sort,convert,pack,unpack} ...

Command-line tool for sorting, converting, packing, and unpacking colors with multiple formats.

positional arguments:
  {sort,convert,pack,unpack}
    sort                Sort colors based on RGB values.
    convert             Convert colors from one format to another.
    pack                Pack colors from a text file into a color file.
    unpack              Unpack colors from a color file into a text file.

optional arguments:
  -h, --help            show this help message and exit

sort handler

color_tool.py sort --help
usage: color_tool.py sort [-h] [--sorting-algorithm {RGB,HSV,HSL,luminosity,step,step-alternated,hilbert}] --input-file INPUT_FILE
                          --format {RGB,HEX,HSL} [--output-file OUTPUT_FILE] [--direction {asc,desc}]

optional arguments:
  -h, --help            show this help message and exit
  --sorting-algorithm {RGB,HSV,HSL,luminosity,step,step-alternated,hilbert}
                        Sorting algorithm to use for colors. Options: RGB, HSV, HSL, luminosity, step, step-alternated, hilbert.
  --input-file INPUT_FILE
                        File containing colors, one per line, in either RGB, HEX or HSL format.
  --format {RGB,HEX,HSL}
                        Format of the output sorted colors. Options: RGB, HEX, HSL.
  --output-file OUTPUT_FILE
                        File to save the sorted and formatted colors.
  --direction {asc,desc}
                        Sort direction of the colors. Options: asc (ascending), desc (descending).

convert handler:

color_tool.py convert --help
usage: color_tool.py convert [-h] --input-file INPUT_FILE --format {RGB,HEX,HSL} [--output-file OUTPUT_FILE]

optional arguments:
  -h, --help            show this help message and exit
  --input-file INPUT_FILE
                        File containing colors, one per line, in either RGB, HEX or HSL format.
  --format {RGB,HEX,HSL}
                        Format of the output converted colors. Options: RGB, HEX, HSL.
  --output-file OUTPUT_FILE
                        File to save the converted colors.

pack handler

color_tool.py pack --help
usage: color_tool.py pack [-h] --input-file INPUT_FILE --format {clr,ase,aco} --output-file OUTPUT_FILE

optional arguments:
  -h, --help            show this help message and exit
  --input-file INPUT_FILE
                        File containing colors, one per line, in either RGB, HEX or HSL format.
  --format {clr,ase,aco}
                        Format of the output packed colors. Options: CLR, ASE, ACO.
  --output-file OUTPUT_FILE
                        File to save the packed colors.

unpack handler

color_tool.py unpack --help
usage: color_tool.py unpack [-h] --input-file INPUT_FILE --format {RGB,HEX,HSL} [--output-file OUTPUT_FILE]

optional arguments:
  -h, --help            show this help message and exit
  --input-file INPUT_FILE
                        Color file containing packed colors.
  --format {RGB,HEX,HSL}
                        Format of the output unpacked colors. Options: RGB, HEX, HSL.
  --output-file OUTPUT_FILE
                        File to save the unpacked colors.

Input File Sample

<HEX_COLOR|RGB_COLOR|HSL_COLOR> <COLOR_NAME
#010203 HEX Color
RGB(56, 99, 79) Resene
HSL(39, 45%, 42%) Resene

color-palettes's People

Contributors

adriansimionov 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.