blend_color()
handling of alpha so it builds over time, use
formula: a + (1-a) * b
where a,b are alpha values between 0 and 1.blend_colors()
- consider preset=getOption("colorjam.blend.preset")
so it can be easily customized with a fixed scheme.jamba
upon load.color_pie()
: make it more similar to jamba::showColors()
color_pie(rainbowJam(12))
should show hex color as labels by default,
same as jamba::showColors()
inner_radius
to make donut plots.Consider replacing label_radius
with combination of
label_just
for label justification relative to its position, where
just=0
means the point is on the left(bottom), andjust=1
means the point is on the right(top).label_pos
for label position within the inner/outer radius:
label_pos=1
positions at the outer radiuslabel_pos=0
positions at the inner radiusConsider new color display function color_spiral()
Alternative to color_pie()
to arrange colors around the color wheel
with concentric rings. Consider using circlize
for spiral display?
Goal is to show a lot of colors in an organized way to facilitate picking a color from a pre-defined set.
Consider adding dependency on farver>=2.1.2
to confirm fixed functions
Improve the color wheels (angles for color breaks)
Revisit the color calculations given farver>=2.1.2
which fixed
bug related to color distance calculations, and nearest color calculations.
"dichromat2"
"dichromat"
"ryb"
"ryb2"
Consider finally porting the Fibonacci color method.
Basic premise: Use magic number phi to represent a Fibonacci spiral around the color wheel.
closest_named_color()
and closestRcolor()
Consider option to return the input/output values in a data.frame
:
Consider alternative color distance function.
farver::compare_colour()
with some adjustment for hue
difference.DONE. Bug: blend_colors()
does not allow changing the preset
DONE. h2hw()
and hw2h()
prioritize preset
over h1
,h2
which
causes blend_colors()
to use the global preset
, since it does
not pass preset="custom"
to enable over-riding the default h1
,h2
values.
Consider new accessible color wheel.
Start with red-yellow-blue color wheel.
Custom showColors()
specifically for sorted colors
indicate along the x-axis where the numeric breaks occur
pretty()
rainbowJam()
consider Hrange
argument to rainbowJam()
which would restrict
colors to this range of hues. Unclear it if means the virtual hue,
or output hue, but probably the virtual hue.
R-shiny app changes:
in h1,h2 scatterplot, editing a point should not change its rank
add label
to plotly shapes, using just the row number
consider double-clicking to add a point to the h1,h2 plot.
Could use plotly::showModal()
to pop-up a confirmation, but later.
* consider right-clicking to remove a point on the h1,h2 plot.
Again, it could use showModal()
to confirm, to prevent accidentally
removing a point. (There is no convenient "Undo"... but there could be I guess.)
* Consider "Undo" button
* When no previous values, the "Undo" button is hidden.
* Reverts to the previous h1,h2 values, then hides the "Undo" button.
* Upon editing any value, store previous values, display "Undo" button.
design2colors()
(when ported here)
consider changing how class colors are assigned, to ensure each class
uses phase
values starting at the same place, in the same order.
Goal is to have first color in each class using the same phase step.
When class
colors are assigned, consider assigning group colors
using hue splitting instead of lightness splitting.
Generate a range of hues so that they do not conflict with other class hues.
(Then use new argument Hrange
.)
Consider retiring h2hw()
,hw2h()
,h2hwOptions()
simplify system to use "Virtual Hue" and "Actual Hue"?
launchColorjamShiny()
to colorjam.shinyapps.io for testing.testthat
, currently coverage is via @examples
shinytest2
to test the R-shiny app. Probably not urgent.Consider secret test mode for rainbowJam()
that uses HSL instead of HCL
likely to show less contrast than HCL, but with better saturation per hue
for testing, use C,L values rescaled to HSL range
Move platjam::design2colors()
here?
Review preset
and step
After real-world usage, decide whether default colors are visually distinct enough
pals
provides functions to evaluate color palettesLrange
, Crange
to broaden visual range.DONE. sort_colors()
default should sort by hue, chroma, luminance.
DONE. Consider HCL-to-HSL hue mapping
DONE. remap_colors()
convert colors to use a different preset
upon changing the hue
DONE. Simple R-shiny app
visualize color palettes with adjustments
step
values for Chroma and Luminancephase
order of stepspreset
from known color wheelsbonus points: edit the color wheel h1
, h2
points:
DONE. enhance "preset"
DONE. associate with a default_step
direction
: 1
or -1
for
direction around the color wheeladd_colorjam_preset()
should validate h1
,h2
and direction
.
DONE. Fix approx_degrees()
when multiple h1
or h2
values are repeated.
The approx()
function requires unique x
values.
x
,y
then uniqueness enforced for x
.h1
,h2
when h2
is used for x
.DONE. register a new color wheel
for example modifying an existing color wheel with adjust_hue_warp()
then saving it as a named preset.
use igraph:::.igraph.shapes
as a model, they store graph node shapes
in that environment, then provide access igraph::shapes()
and
allow new shapes with igraph::add_shape()
.
DONE. port color_complement()
into this package.
make_jam_divergent()
When argument linear2
is not supplied, get color_complement(linear1)
jam_linear
and jam_divergent
without
package prefix when the colorjam package is not formally loaded.Migrate platjam::design2colors()
into this package
Consider color_list
related functions, since design2colors()
produces a list of colors and color functions.
merge_color_lists()
would combine two color lists into one, taking
either the union of assigned colors, or the first color function, where
relevant.Migrate platjam::design2colors()
here.
Intended to take data.frame
with group, subgroup,
and create a list
of colors for each column, either
with named character
color vectors named by value,
or color functions
for numeric
columns, as created
by circlize::colorRamp2()
.
No longer necessary: Implement HSL color space for categorical colors,
slowly replacing HCL colorspace in rainbowJam()
.
These items are not likely to be on an active todo list:
group2colors()
which applies
a systematic re-ordering of colors assigned to labels. For
example, labels are typically assigned sequential color
hue, which may not be ideal for all cases. This method would
assign colors to every n-th color.subgroup2colors()
which extends group2colors()
by
splitting each color into subgroups as needed. In this way,
experiment factors can each be assigned colors, while the
factor levels are assigned values from a gradient for each
color. In future, this function will optionally use a
color family (or small range of color hues) to each factor,
then will vary the hue, as well as the chroma/luminance for
factor levels.vals2colorLevels()
assigns colors to a numeric range,
keeping zero as a mid-point for divergent color scales.
Notably allows a "color lens" which applies a scalable adjustment
to the color ramp to enhance or reduce the color intensity across
the numeric range.Perhaps the most frequently used JAM function is (was) a fixed-width colorized table viewer for console output.
Similar in theory to the custom tibble print method, this function goes further by colorizing values in each column to help the visual summary.
Similar R package pillar
offers colorized formatted
data.frame
/tibble
output.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.