Skip to content

ENH: Improved color Manipulation tools #9995

Open

Description

@jklymak

Feature suggestion

In #9985 a small utility was proposed to brighten or darken a matplotlib color. The utility converted to RGB, to HLS, manipulated the L (lightness) channel, and converted back to RGB.

There was general disagreement about how exactly to do the brightening, (fractional: L*(1+frac), absolute: L + dL, or simply specifying L), the lack of a rgb_to_hls converter was lamented (to mirror the rgb_to_hsv converter, and it was suggested that a color class that simply had methods to change channels in the various color spaces would be the better approach.

Writing such a class was beyond the scope proposed in #9985, hence this issue for discussion. I'd imagine such a color class would require a MEP.

Activity

  1. added this to the milestone on Dec 13, 2017
  2. modified the milestones: v3.0, v3.1 on Aug 11, 2018
  3. modified the milestones: v3.1.0, v3.2.0 on Feb 27, 2019
  4. modified the milestones: v3.2.0, v3.3.0 on Aug 26, 2019
  5. modified the milestones: v3.3.0, v3.4.0 on Apr 30, 2020
  6. modified the milestones: v3.4.0, v3.5.0 on Jan 27, 2021
  7. modified the milestones: v3.5.0, v3.6.0 on Aug 18, 2021
  8. modified the milestones: v3.6.0, v3.7.0 on Jul 8, 2022
  9. QuLogic commented on Mar 24, 2023

    @QuLogic
    Member

    As another note, the standard library contains colorsys which does contain the missing rgb_to_hls.

  10. github-actions commented on Jun 17, 2024

    @github-actions

    This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!

  11. timhoffm commented on Jun 17, 2024

    @timhoffm
    Member

    Note: Seaborn has a function desaturate.
    Maybe it's an option to just pull this upstream.

  12. added
    keepItems to be ignored by the “Stale” Github Action
    on Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions