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

Stop using java.awt.Color #5

Closed
HopeBaron opened this issue Jun 16, 2020 · 0 comments
Closed

Stop using java.awt.Color #5

HopeBaron opened this issue Jun 16, 2020 · 0 comments
Assignees

Comments

@HopeBaron
Copy link
Member

Kord uses java.awt.Color to represent colors. This issue suggests moving to our own/a multiplatform implementation.

Why switch from java's implementation

  • People using jlink to reduce the size of the JRE are forced to include the java.desktop module for what in our use case is a glorified integer. It comes down to ~30 megabytes which would be nice to shave off.
  • We'll move to multiplatform eventually, and will be required to implement a Color regardless (or risk depending on an npm module!). We might as well make one that fits all platforms.

Isn't this outside of Kord's scope

It is, technically, outside of our scope. A color class is not related to the Discord API. A simple Color(r,g,b) should be sufficient though. The alternative would be to just accept an integer, which would be a dramatically worse user experience.

Issue originally made by @BartArys

HopeBaron added a commit that referenced this issue Jun 17, 2020
@HopeBaron HopeBaron self-assigned this Jun 18, 2020
HopeBaron added a commit that referenced this issue Jun 20, 2020
HopeBaron added a commit that referenced this issue Jun 20, 2020
HopeBaron added a commit that referenced this issue Jun 28, 2020
HopeBaron added a commit that referenced this issue Jul 8, 2020
HopeBaron added a commit that referenced this issue Jul 10, 2020
HopeBaron added a commit that referenced this issue Aug 21, 2020
HopeBaron added a commit that referenced this issue Oct 28, 2020
@BartArys BartArys mentioned this issue Nov 20, 2020
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

No branches or pull requests

1 participant