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

Added codecs to Color class #639

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

legopitstop
Copy link

Added codecs to Color class.

Codecs

  • RGBA_CODEC - A json object {r: 255, g:255, b:255, a:255}
  • STRING_CODEC - A hex string color like #fff or #ffffff
  • INT_CODEC - An argb integer color.
  • CODEC - Either STRING_CODEC or RGBA_CODEC

@legopitstop legopitstop changed the title Added codecs Added codecs to Color class Oct 9, 2024
@Tslat
Copy link
Collaborator

Tslat commented Oct 10, 2024

Why do we need codecs for this exactly? lol

@legopitstop
Copy link
Author

For loading colors from JSON. It is mainly needed for the project that I'm working on and I figured others may need to parse colors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants