Giter Club home page Giter Club logo

colorizzar's Introduction

Colorizzar

Change the color of an image without lose alpha channnel (alpha layer)
Altere a cor da sua imagem sem perder a camada de alpha (transparência)

You can change the color of this car (Or any imagem you want)

You can create specific color by RGB:

<?php

require_once 'vendor/autoload.php';

use Colorizzar\ChangeColor;

$changeColor = new ChangeColor();
$changeColor->colorizeKeepAplhaChannnel('red_car.png', 31, 117, 254, 'new_blue_car.png');

Or Just choose one by colorName

$changeColor->colorizeByNameColor('Blue', 'car_red.png', 'cars/'); // Will create 'blue.png'

Ex of result colorizeKeepAplhaChannnel(), colorizeByNameColor()

Scheme

Create all 135 COLORS with colorizeToAllColors() !

Scheme

$changeColor->colorizeToAllColors('car_red.png', 'cars/');
SSH:
git clone [email protected]:gabrieldarezzo/colorizzar.git

HTTPS:
git clone https://github.com/gabrieldarezzo/colorizzar.git

cd colorizzar  
composer update  

Don't forget require autoload

<?php

require_once 'vendor/autoload.php';

use Colorizzar\ChangeColor;

TODO-LIST:

  • *Create a plugin in JS consume colorizzar and show in realtime result
  • Add DockBlock in all methods
  • Improve tests (check if has new rgb in image created instead just check if file is created)
  • Improve ChangeColor.php SOLID (Create/Read file for example)
  • Create some way custom color can be use and re-used in Colorizzar\Colors

'* 1 - Hash create by upload image
2 - create a folder with same name of hash
3 - result a JSON with all urls created
4 - pop in JS and show final result to user like a magic

//List things to-do in Folder before commit:
.\vendor\bin\phpcs --standard=PSR2 src\

//Fix File!
.\vendor\bin\phpcbf --standard=PSR2 src\file.php

Fix a Folder
.\vendor\bin\phpcbf --standard=PSR2 src\ -w --no-patch

//Don't Forget check if you don't break anything hehe. You need test manually #NOT
.\vendor\bin\phpunit

Don't know RGB color of your HEX?!

https://www.webpagefx.com/web-design/hex-to-rgb/

Thanks to:

https://stackoverflow.com/users/433392/steap

colorizzar's People

Watchers

James Cloos avatar Marcos Ronaldo 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.