jpmckinney / color-generator Goto Github PK
View Code? Open in Web Editor NEWRuby gem to randomly generate distinct colors with consistent lightness and saturation
License: MIT License
Ruby gem to randomly generate distinct colors with consistent lightness and saturation
License: MIT License
I pulled in this gem and it worked perfectly for my use case today. Thanks for making something simple that works!
I think there might be an error in the link algorithm:
color-generator/lib/color-generator.rb
Line 98 in e4ffecf
From wikipedia it seems like we should divide by 60, h_prime = h / 60
.
Is this an error or am I mistaken and there is a valid reason we multiply here instead?
Great plugin, thanks a lot!
Just a quick question: Is there a way to generate grayscale colours only?
I tried reducing the saturation
and lightness
parameters to 0.1
and even 0
but to no avail.
Hi, this looks like a cool library - I found it after searching for Ruby alternatives to randomColour.js, and think it could just hit the spot for what I need.. although I'm looking for a little guidance.
The readme says I can specify the saturation
and lightness
I want for generating the colours, and looking at what the randomColour.js readme says:
...randomColor produces bright colors with a reasonably high saturation.
...suggests I should be able to set similar results from this library if I use the correct values - but I'm not sure which values I should be using when I instantiate the object.
I'm very new to playing with colours, so am actually a little confused by some of the terms used, so apologies if I'm asking silly questions.
Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.