two-ticks / p5.teach.js

A beginner friendly math animation library for p5.js
https://two-ticks.github.io/p5.teach.js/
59 stars 7 forks source link

Color palette #26

Closed nickmcintyre closed 3 years ago

nickmcintyre commented 3 years ago

@two-ticks I'm trying to use IBM's color blind safe palette for visualizations in my book whenever possible and find myself copying the hex colors to new sketches a lot. What do you think about exporting the following constants?

export const ULTRAMARINE40 = '#648fff';
export const MAGENTA50 = '#dc267f';
export const GOLD20 = '#ffb000';
export const INDIGO50 = '#785ef0';
export const ORANGE40 = '#fe6100';
JithinKS97 commented 3 years ago

I think its a good idea, may be we can include more colours?

nickmcintyre commented 3 years ago

Sounds good to me! The IBM color library is a good starting point - here's another.

two-ticks commented 3 years ago

Can we have object having the colors instead of exporting separately? for example safeColor.ULTRAMARINE40

27

example: https://editor.p5js.org/radium.scientist/sketches/Kma0_EpQc

nickmcintyre commented 3 years ago

Closing this one after merging #27