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

Colour constants don't match with the original C library #207

Open
villuna opened this issue Nov 21, 2024 · 0 comments
Open

Colour constants don't match with the original C library #207

villuna opened this issue Nov 21, 2024 · 0 comments

Comments

@villuna
Copy link

villuna commented Nov 21, 2024

A bunch of the colour constants in this crate have the same names as the original C library but have very different values. For example, DARKGRAY in the C library is defined as [80, 80, 80, 255], but Color::DARKGRAY in this crate is [169, 169, 169, 255].

It looks like they were changed in this pr. I think adding new colours is great and I wouldn't want to get rid of these new values, but I don't like that they're overwriting the original ones. I think it would be annoying for people switching from a different language - I ran into this problem trying to port a raylib project from C++ to Rust, and when everything looked wrong I got worried there was some kind of rendering/colour space issue.

Personally I would like the original colours to have their original names for compatibility, and then any new colours to have new names. But that might also cause issues, since people that are already using the new colours will be annoyed when all THEIR colours change... So I'm not sure what would be best to do about it.

This isn't that big of an issue, I mean, it's easy to just copy the old colours from the raylib cheatsheet. But I'd just like to put it out there for discussion because it tripped me up.

@villuna villuna changed the title Colours constants don't match with the original C library Colour constants don't match with the original C library Nov 21, 2024
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