Closed maxmeyer closed 6 years ago
Interesting ideas @maxmeyer. color
and base_color
aren't meant to be used together, so something like this would deal with that. I think we'd need to think of a clearer naming convention for the color mode (color
and base_color
still seem confusing in that context), but I see where you're going. The only part I think would be a no-go would be the gradient idea since these are these are repeating tiles and a repeating gradient would look janky.
My biggest thing is that I'd like to keep the simplest case in tact – where a user can just pass a string and maybe a color or base color and get the same pattern they get today. If we can come up with a clean way of making fancier patterns w/o cluttering the basic use case, I'm all for experimenting with it.
My biggest thing is that I'd like to keep the simplest case in tact
I think that this is possible with reasonable defaults.
The only part I think would be a no-go would be the gradient idea since these are these are repeating tiles and a repeating gradient would look janky.
Ok. This was the thing which came into my mind first. :)
I will try and put together a PR.
Closing this for now.
Based on the work done in #46 we could extend the
GeoPattern
-api "a bit". If I look at the:color
and the:base_color
-options I ask myself, what they really stand for. From my point of view it's more some likeIf we change the api like this, we could add some more color generators easily, like
:inverse
. If we allow the use of multiple colors in:color
we could also support something like:substract
. If we use a similar algorithm:seed
we use for thePatternGenerators
we could also support more than two colors. Maybe should also use:colors
instead of:color
. This would make it easier to implement it.For the time being I would support the old options as well, but would deprecate them.
Internally we could use a
ColorModeStore
, aColorModeSive
and use the same development "pattern" we used for theStructureGenerators
.If we go further, we could also support
:background_mode
with:solid
(default) and maybe:linear_gradient
.@jasonlong @ttaylor What do you think about that?
@jasonlong If you're willing to accept such a PR I can put together the code for that.