GithubHelp home page GithubHelp logo

sketchsie / itunes-album-palette Goto Github PK

View Code? Open in Web Editor NEW

This project forked from patpaev/itunes-album-palette

0.0 0.0 0.0 7.02 MB

PHP Image Workshop function for extracting the "main" color from an image

License: MIT License

ApacheConf 0.18% PHP 98.44% CSS 1.38%

itunes-album-palette's Introduction

iTunes Album Palette

I loved the idea that Apple introduced in iTunes 11 of creating dynamic colour palettes for individual album views dependent on the album art.

iTunes Screenshot

This technique could be used to enhance design and UX, providing automatic theming, in a number of circumstances on the web if executed well.

While mine is by no means a comprehensive approach, it provides a proof of concept for the idea.

Usage

Start up a web server, put some of your own images in the /img folder and voíla!

I've placed a selection of (royalty free) images in there thanks to the kind folks at Unsplash, The Pattery Library and Gratisography!

I've tried to sample images where the technique I've used does and doesn't work to demonstrate the merits and limitations of this approach.

The interface looks something like this:

Usage Screenshot

Future

While I don't intend to perfect this, further improvements for a more complete solution would be:

  • Analysis of more pixels in detail to determine which colour is actually the most dominant, instead of heavily approximating
  • Ensuring there's enough contrast between the background colour and the text color
  • Reduce the amount of browns that the algorithm returns
  • Return a secordary color
  • Don't let it return negative RGB values
  • Allow uploads
  • Clear the cache of palette files
  • Refactoring the code, because I wrote it a couple of years ago and it's messy.

Disclaimer

Creative Commons License, no affiliations with Apple or iTunes. Feel free to use / modify / add / contribute :)

itunes-album-palette's People

Contributors

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