Skip to content

pattern bgcolor & fgcolor as well as overlay fillmode #5728

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nicolaskruchten opened this issue Jun 14, 2021 · 5 comments · Fixed by #5733
Closed

pattern bgcolor & fgcolor as well as overlay fillmode #5728

nicolaskruchten opened this issue Jun 14, 2021 · 5 comments · Fixed by #5733
Labels
feature something new
Milestone

Comments

@nicolaskruchten
Copy link
Contributor

nicolaskruchten commented Jun 14, 2021

Right now patterns basically replace fills, and I want to introduce a second mode where they overlay them instead:

  • new attribute marker.pattern.fillmode= enum(default=replace, overlay)
  • new attribute marker.pattern.fgcolor
  • replace fillmode is the current behaviour:
    • marker.pattern.bgcolor is transparent
    • marker.pattern.fgcolor = marker.color
  • overlay fillmode will be:
    • marker.pattern.bgcolor = marker.color
    • marker.pattern.fgcolor will be set to to contrast the bgcolor using the same algo we use to contrast text on bars
@archmoj archmoj added the feature something new label Jun 14, 2021
@alexcjohnson
Copy link
Collaborator

I like the behavior. Maybe change the value from fill to mask though? I like the value overlay, but fill doesn't seem like its opposite for this purpose.

@nicolaskruchten
Copy link
Contributor Author

I guess I meant it as "the pattern takes the place of the fill"... what's the case for "mask" ?

@alexcjohnson
Copy link
Collaborator

"fill" sounds to me like "the pattern fills the bar", which isn't any more true for this mode than for overlay mode. By "mask" I meant "the pattern masks the bar fill" which feels more directly opposed to "the pattern overlays the bar fill" - I grant though that this is fairly technical / esoteric usage of the word "mask" so if there's a better word I'm all ears :)

@nicolaskruchten
Copy link
Contributor Author

How about marker.pattern.fillmode = replace | overlay ... the pattern either replaces the fill or overlays it.

@alexcjohnson
Copy link
Collaborator

marker.pattern.fillmode = replace | overlay Sold 🎉

@archmoj archmoj added this to the NEXT milestone Jun 15, 2021
@archmoj archmoj changed the title pattern modes: fill and overlay pattern modes: replace and overlay Jun 16, 2021
@archmoj archmoj changed the title pattern modes: replace and overlay pattern bgcolor & fgcolor as well as overlay fillmode Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new
Projects
None yet
3 participants