Skip to content

a color coded generator for pascal's triangle. A hosted version can be found at:

Notifications You must be signed in to change notification settings

JohnnySn0w/PascalColored

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

I thought pascal's triangle was pretty neat so I decided to color code it a little to see what would happen. Not dissapointed. Will likely add further functionality, like changing the colors or the coloring rules.

Feel absolutely free to play with this and add functionality, I think it has potential as a teaching and research tool.


Currently:

  • the color is determined by whether or not the coefficient can be divided evenly into a number. The highest number is 7, and anything that's prime higher than 7 is caught and colored for that. The rest of the coefficients that fall under being divisible by 6/5/4/3/2, are colored based on whichever number that they can evenly divide into is highest. so 12 is colored based on 6.

  • font size is hard coded currently, because I didn't want to deal with the headache of making it percentage based atm. 24+ characters gets 8px font, 35+ characters gets 4px, 49+ 2px, and 99+ gets 1px.

About

a color coded generator for pascal's triangle. A hosted version can be found at:

Topics

Resources

Stars

Watchers

Forks