Skip to content
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

Polymorphic color palettes #546

Open
olekscode opened this issue Jun 4, 2023 · 3 comments
Open

Polymorphic color palettes #546

olekscode opened this issue Jun 4, 2023 · 3 comments
Labels
chart enhancement New feature or request

Comments

@olekscode
Copy link
Contributor

In Roassal3, I would like to have a color palette API that could be used like this:

"Choose a color palette"
palette := RSColorPaletteA new.
palette := RSColorPaletteB new.
palette := RSColorPaletteC new.

"Use named colors"
palette red.
palette green.
palette yellow.
palette blue.
palette darkRed.
palette lightBlue.

The idea is the same as in Color red. Color yellow, etc.
Why?

Because in most applications, when we chart, we want to say "give me a red line and a blue line". And then we don't need those colors to be true red (i.e., Color red) or true blue (i.e., Color blue). We want them to be red and blue that are aestethically beutiful and match each other well.

This can be decided by the palette class.

Also, users want to say "red" and "blue", not "third color from palette diverse085"

@olekscode
Copy link
Contributor Author

We could take some inspiration from this package:
https://github.com/DuneSt/MaterialColors

It subclasses Color to follow Materiel Design color recommendations
https://m2.material.io/design/color/the-color-system.html

@akevalion
Copy link
Contributor

akevalion commented Jun 5, 2023

This issue is related outside of Roassal, probably this is a new project.

These sets of colors can be used by not only roassal, also spec or https://github.com/plantec/Toplo

Roassal contains already some color palettes in Roassal3-Colors with classes like RSColorPalette

palette := RSColorPalette sequential blues9.
image

@akevalion akevalion added enhancement New feature or request chart labels Aug 10, 2023
@akevalion
Copy link
Contributor

moved to pharo-graphics/Roassal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chart enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants