5 ms·
Please.js – Random Pleasing Colors
- swalsh 12y agoSomewhat unrelated, but i'd like an API similar to this... but the colors would contrast well for someone who is color blind.
- deleted 12y ago[deleted]
- kyberias 12y agoI beg your pardon, but what do you mean an API? This JavaScript library has an API, Application Programming Interface. Just use it.
- pc86 12y agoHe probably means REST API as that seems to have become the default meaning of API, unfortunately.
- kyberias 12y agoThat was something I suspected as well, but that doesn't seem to make any sense. Why would anyone want to use a REST API to select colors when a local lib with similar functionality exists?
- jjcoffee 12y agoYou are actually both mistaken. I'm quite sure he understands what a javascript library is. He is simply asking for a library with a similar API, with the qualification that the colors are not truly random, but contrast with each other in a significant manner. Don't be so hasty to conclude that someone is saying something stupid because you might not agree with the phrasing. Try and understand and add to the discussion if you're going to respond.
- swalsh 12y agoThanks, for standing up. This is exactly what I was saying.
- swalsh 12y agoI absolutely did not mean REST API. I've been doing this for 10 years, I know what a javascript library was. Why do programmers automatically default to assuming incompetence?
- collyw 12y agobecause the word API (referring to a REST API) seems to be one of the currently trendy ones in the tech churn, and is the answer to almost every problem that can't be fixed by a NoSQL database.
- swalsh 12y agoSorry, I guess technically, yes i'd like a javascript library. You kind of missed the point.
- dictum 12y agoThis is highly subjective, but to me, it's biased to output colors that are more web-safe palette meets pastel colors than pleasing.
- JordanCheckman 12y agoYou're not wrong. But pleasing is pretty subjective so I shot for what I liked and I hoped people would agree. That being said, you can alter the saturation and value manually to get more or less intense colors.
- kmfrk 12y agoI like this, though, as it makes it more useful for specific purposes - especially alerts, buttons, and background colours.
- roganartu 12y agoAs a colourblind person who struggles with coming up with good looking colour schemes, this looks really nice. I've used the likes of Palleton [1] and Kubler [2] before but they seem to be geared towards graphic designers and people who actually understand terms like adjacent, triad and compliment in the context of colours. [1] http://www.paletton.com/ http://www.paletton.com/ [2] https://kuler.adobe.com/create/color-wheel https://kuler.adobe.com/create/color-wheel
- mcot2 12y agoIt would be nice if this could output colors for something like a heatmap.
- rcthompson 12y agoHow about this? http://colorbrewer2.org/ http://colorbrewer2.org/
- kmfrk 12y agoIn the case where you retrieve multiple random colours, is there a chance you could add a setting that doesn't return colours that are too close to each other?
- voltagex_ 12y agoAs an addition to this, it may be possible to modify it in such a way that it always returns colours that meet WCAG2 AA/AAA contrast requirements
- argc 12y agoI like the colors it generated for me very much... But it should also have the ability to generate ugly colors. It's just not fair to favor the pleasing colors so heavily.
- wlievens 12y agoDoes it have an API for generating contrasting colors? For instance for a chart, you'd like to generate a set of colors that are all not too alike each other.
- bunkat 12y agoEvery time I come across one of these color generators it just reminds how much a good designer is worth. Putting together a pleasing color palette with the appropriate amount of contrast, interest, and color quality is really hard to do. I always laugh when our designer updates color values to ones that may look identical to me, but as soon as they are implemented and play off the other colors in the design (including the white space) everything just instantly feels more polished.
- JordanCheckman 12y agoHey guys, I'm the guy that wrote this. Colorblind mode and contrast are common suggestions and I'm totally working on adding them in. In the meantime, thanks for all the feedback and enjoy using Please.
- owenversteeg 12y agoThanks, it looks cool! However, you should probably add something to the docs that mentions that make_scheme requires an HSV color as a param.
- JordanCheckman 12y agoWill do!
- owenversteeg 12y agoThis is MIT licensed [0] but the author should probably note that on the website page or in a LICENSE file. [0] https://github.com/Fooidge/PleaseJS/blob/master/bower.json https://github.com/Fooidge/PleaseJS/blob/master/bower.json
- sgibat 12y agoVery similar to randomColor.js: http://llllll.li/randomColor/ http://llllll.li/randomColor/ Definitely need a contrast mode. I've been thinking about forking randomColor.js for the last week to implement that feature actually..
- dmerfield 12y agoYou're absolutely right, contrast options are something I've been meaning to add for a while. Please do!
- panzi 12y agoSomeone make a bookmarklet to fix unpleasing web sites using this.
- sahoo 12y agohttps://news.ycombinator.com/item?id=7824684 https://news.ycombinator.com/item?id=7824684
- __david__ 12y agoI made a jsfiddle for playing around with the API: http://jsfiddle.net/MsXrp/1/ http://jsfiddle.net/MsXrp/1/ I'm quite happy with what I see so far.
- hackdays 12y agoPretty cool. I added it to add some colors to our website: http://referralhire.com http://referralhire.com Thanks! Its getting obvious to me now, if a good designer suggests color add them else shutup and keep it white or black :)
- deleted 12y ago[deleted]
- elwell 12y agoNow hook this up to your A/B test variations on a few components...