Giter VIP home page Giter VIP logo

color's People

Contributors

adamwulf avatar getriebesand avatar ifreilicht avatar moagrius avatar qlurkin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

color's Issues

RGBA not parsing the alpha channel

For some reason, creating a color using the code below creates a color where its alpha component is 1:

var tColor = new Color('rgba(0, 128, 0, 0.5');

All functions that operate on the alpha component (such as tColor.alpha() or tColor.getRGBA()) return it equivalent to 1, when it should have been equivalent to 0.5.

I am using Color.commented.js, as it was posted on September 1st, 2011.

parse rgb string doesn't work

In parse(value) if value is a rgb string, function p2v returns a string, but number is required for absround() later in format functions.

change
var p2v = function(p){ return isPercent.test(p) ? absround(parseInt(p) * 2.55) : p; };
to
var p2v = function(p){ return isPercent.test(p) ? absround(parseInt(p) * 2.55) : parseInt(p); };
will fix this issue

HSB not mirrored in getHex()

Hi, just downloaded this project and found that this code

console.log(self.color.hue(),self.color.saturation(),self.color.brightness()); console.log(self.color.getHex(),self.color.getRGB());

yields this result in the console.

0 73 52.99999999999999
#000000 rgb(0, 0, 0)

And I'm struggling to find a way that this is my bug.
I've just got 3 sliders set up setting the H,S,B of the color.
Any ideas?

Any license?

Just wondering if you released this lib under any license.
Would be great to know, since we could really use your code in our project.

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.