ladybird/Libraries
InvalidUsernameException 7c315ef67f Everywhere: Unify naming of RGBA-like colors
The `Bitmap` type was referring to to its internal pixel format by a
name that represents the order of the color components as they are layed
out in memory. Contrary, the `Color` type was using a naming that where
the name represents the order of the components from most to least
significant byte when viewed as a unsigned 32bit integer. This is
confusing as you have to keep remembering which mental model to use
depending on which code you work with.

To unify the two, the naming of RGBA-like colors in the `Color` type has
been adjusted to match the one from the Bitmap type. This seems to be
generally in line with how web APIs think about these types:
* `ImageData.pixelFormat` can be `rgba-8unorm` backed by a
  `Uint8ClamedArray`, but there is no pixel format backed by a 32bit
  unsigned type.
* WebGL can use format `RGBA` with type `UNSIGNED_BYTE`, but there is no
  such format with type `UNSIGNED_INT`.

Additionally, it appears that other browsers and browser-adjacent
libraries also think similarly about these types:
* Firefox:
  https://github.com/mozilla-firefox/firefox/blob/main/gfx/2d/Types.h
* WebKit:
  https://github.com/WebKit/WebKit/blob/main/Source/WebCore/platform/graphics/PixelFormat.h
* Skia:
  https://chromium.googlesource.com/skia/+/refs/heads/main/include/core/SkColorType.h

This has the not so nice side effect that APIs that interact with these
types through 32bit unsigned integers now have the component order
inverted due to little-endian byte order. E.g. specifying a color as hex
constant needs to be done as `0xAABBGGRR` if it is to be treated as
RGBA8888.

We could alleviate this by providing endian-independent APIs to callers.
But I suspect long-term we might want to think differently about bitmap
data anyway, e.g. to better support HDR in the future. However, such
changes would be more involved than just unifying the naming as done
here. So I considered that out of scope for now.
2025-11-28 18:32:48 +01:00
..
LibCompress CMake: Rename serenity_* helper functions/macros to ladybird_* 2025-07-03 23:19:41 +02:00
LibCore LibCore: Remove unused NotifierActivationEvent fd() and type() methods 2025-11-22 09:47:25 +01:00
LibCrypto LibCrypto: SHA3 hashing algorithm 2025-11-26 22:01:00 -05:00
LibDatabase LibDatabase+RequestServer: Store ByteString data as a BLOB 2025-11-12 09:06:21 -05:00
LibDevTools LibDevTools+LibWebView: Implement initial accessibility tree view 2025-10-20 10:51:19 +01:00
LibDiff CMake: Rename serenity_* helper functions/macros to ladybird_* 2025-07-03 23:19:41 +02:00
LibDNS LibDNS: Remove LibCore::DateTime dependency 2025-09-30 12:39:01 +02:00
LibFileSystem CMake: Rename serenity_* helper functions/macros to ladybird_* 2025-07-03 23:19:41 +02:00
LibGC LibGC: Add GC::Heap::the() 2025-11-01 08:40:32 +01:00
LibGfx Everywhere: Unify naming of RGBA-like colors 2025-11-28 18:32:48 +01:00
LibHTTP LibHTTP: Remove unused HttpRequest functions re: basic auth 2025-11-28 08:48:33 -05:00
LibIDL LibIDL: Support extended attributes on namespace members 2025-09-11 17:06:44 +01:00
LibImageDecoderClient CMake: Rename serenity_* helper functions/macros to ladybird_* 2025-07-03 23:19:41 +02:00
LibIPC LibIPC: Change TransportSocket to read and write on I/O thread 2025-11-02 22:43:10 +01:00
LibJS LibJS: Add fast path for loosely comparing object and nullish values 2025-11-26 22:03:31 -05:00
LibLine Everywhere: Slap some [[clang::lifetimebound]] where appropriate 2025-09-01 11:11:38 +02:00
LibMain AK: Expose helpers to invoke Windows runtime config directly in main() 2025-10-29 21:07:52 -06:00
LibMedia Everywhere: Avoid large rebuilds when editing (Immutable)Bitmap headers 2025-11-28 18:32:48 +01:00
LibRegex LibRegex: Add missing StringSet cases 2025-11-27 14:02:04 +01:00
LibRequests LibHTTP+LibWeb+RequestServer: Move Fetch's HTTP header infra to LibHTTP 2025-11-27 14:57:29 +01:00
LibSyntax Everywhere: Slap some [[clang::lifetimebound]] where appropriate 2025-09-01 11:11:38 +02:00
LibTest AK: Expose helpers to invoke Windows runtime config directly in main() 2025-10-29 21:07:52 -06:00
LibTextCodec LibTextCodec+LibWeb: Move isomorphic coders to LibTextCodec 2025-11-27 14:57:29 +01:00
LibThreading LibThreading: Remove Weakable from Thread 2025-09-22 17:28:21 -05:00
LibTLS LibTLS: Use Windows-specific method to set default certificate store 2025-08-23 18:35:45 -06:00
LibUnicode LibRegex: Support matching unicode multi-character sequences 2025-11-26 11:34:38 +01:00
LibURL LibURL: Add a few missing internal page factories 2025-09-18 07:27:24 -04:00
LibWasm Meta: Increase the line length enforced by prettier to 120 2025-10-31 19:55:50 -04:00
LibWeb Everywhere: Unify naming of RGBA-like colors 2025-11-28 18:32:48 +01:00
LibWebSocket LibHTTP+LibWeb+RequestServer: Move Fetch's HTTP header infra to LibHTTP 2025-11-27 14:57:29 +01:00
LibWebView LibHTTP+LibWeb+RequestServer: Move Fetch's HTTP header infra to LibHTTP 2025-11-27 14:57:29 +01:00
LibXML LibWeb+LibXML: Make Listener::set_source(ByteString) fallible 2025-10-02 02:25:28 +02:00
CMakeLists.txt LibDatabase+LibWebView: Extract our SQLite wrapper to its own library 2025-10-14 13:40:33 +02:00