You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
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]
, butColor::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.
The text was updated successfully, but these errors were encountered: