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

Change Color3.new picker to do / 255 in the code instead of in the extension #5

Open
Kampfkarren opened this issue May 19, 2019 · 4 comments
Labels
enhancement New feature or request scope: ts

Comments

@Kampfkarren
Copy link
Owner

Kampfkarren commented May 19, 2019

Make it so instead of Color3.new(0.123456, 0.12436645, 0.238934) it's Color3.new(r / 255, g / 255, b / 255) with special cases for 0, 1, and 0.5.

@Kampfkarren Kampfkarren added the enhancement New feature or request label May 19, 2019
@Kampfkarren
Copy link
Owner Author

This is easier said than done, it requires that the regex be changed to support this syntax as well, otherwise it just changes it to fromRGB.

@JohnnyMorganz
Copy link
Contributor

When doing this, would this be default behaviour? Could also maybe make it a setting to use the decimal equivalent instead (don’t know why people would want that)

@Kampfkarren
Copy link
Owner Author

I don't think a preference is needed, but this would probably be the default. Problem is also supporting being able to read sane decimal formats like Color3.new(0, 0.5, 1)

@JohnnyMorganz
Copy link
Contributor

One idea could be to read the decimal, truncate it to a sane number of decimal places, and see if that matches the original number [probably easiest to convert to a string first]
If so, keep the number as is, otherwise convert to a x / 255

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

No branches or pull requests

2 participants