rstudio/leafletjs — pull request #15 by jcheng5 (2014-12-12 04:11:20+00:00)
Title: Functions for easy coloring

Adds a family of functions for mapping values to colors.

|Continuous values|Categorical values
---|---|---
Continuous colors|`colorNumeric`|N/A
Discrete colors|`colorBin` and `colorQuantile`|`colorFactor`

This makes it possible to describe most color mappings in a single function call.

Hat tip to @hadley, who has forgotten more than I will ever know about scaling.

I need to take another pass on the documentation and there are a few test cases that aren't quite right, but I would love some eyes on this now.