Closed mattmalin closed 5 years ago
First implementation will return just a hex string, with further return methods as part of #6
Should function colour exist before randomcolour?
Should randomcolour be random_color?
3a. Should a parameter be included to introduce a bias, so that future demonstrations can be done on sampling distributions with color?
3b. Should there be a bias based on the individual parameters of a color (eg more red).
since randomcolour is just producing a string, colour wouldn't do much as a precursor, but we could make a separate colour format "converter" called colour perhaps?
I was also wondering the best to use. I've put in randomcolour with
randomcoloralias but was also thinking
random_colourand
random_color` might be better. I was mainly aligning it with randomcolour.com but we could change it?
3a and 3b would be extensions :) currently I've just got copying randomcolour.com method which is uniform across the numeric versions of the colours, and can be controlled through the choice of RNG (it uses sample
under the hood. I've got #5 around controlling random colour methods, with I think will be when to cover differ approaches, or different biases. There ends up being a large overlap with palette generation which does already have a wide set of packages existing already, so will probably draw from those I suspect rather than reinvent the wheel.
Another thought for function naming rcol (a bit like rnorm)
It's nice to be consistent with the domain name
The simplicity of the current solution is nice.
Another thought for function naming rcol (a bit like rnorm)
I like the consistency with the distribution functions for e.g. rnorm
etc but rcol
seems a bit too similar and confusing to some form of row/col operation.
This doesn't have to be the final form, as we can always alias or rename at some point when more functions start relying on it. Whichever function we keep as the primary call, I'll always include a randomcolour(...)
wrapper call I'm sure for consistency with the domain.
This will be the core function for all example calls. Will want to optionally specify a random seed to start, and output formats for consumption in display formats.
First example should give either hex string or 255,255,255 style vector