ashiguruma / patternomaly

Easily generate patterns for use in data graphics
MIT License
524 stars 37 forks source link

Provide a way to automatically generate patterns #3

Closed ashiguruma closed 7 years ago

ashiguruma commented 7 years ago

Something along the lines of:

var chartData = {
    datasets: [{
        data: [45, 25, 20, 10],
        backgroundColor: pattern.generate(
            '#ff6384',
            '#36a2eb',
            '#cc65fe',
            '#ffce56'
        )
    }],
    labels: ['Red', 'Blue', 'Purple', 'Yellow']
};