Skip to content

(LTS) Add option to store colors as hex - #355

Open
ninjaguardian wants to merge 4 commits into
isXander:ltsfrom
ninjaguardian:feat/lts/hex-colors
Open

(LTS) Add option to store colors as hex#355
ninjaguardian wants to merge 4 commits into
isXander:ltsfrom
ninjaguardian:feat/lts/hex-colors

Conversation

@ninjaguardian

@ninjaguardian ninjaguardian commented Aug 2, 2026

Copy link
Copy Markdown

Adds this option to GsonConfigSerializerBuilder:

    /**
     * If disabled, writes colors to the json in decimal ({@code -1610612736}).
     * If enabled with JSON5 ({@link #setJson5(boolean)}), writes colors to the json as hexadecimal literals ({@code 0xA0000000}).
     * If enabled without JSON5, writes colors to the json as hexadecimal strings ({@code "0xA0000000"}).
     * Colors are saved in ARGB.
     *
     * @param hexColor whether to store color in hexadecimal instead of decimal
     * @return this builder
     */
    GsonConfigSerializerBuilder<T> setStoreColorsAsHex(boolean hexColor);

Main: #356

@ninjaguardian
ninjaguardian marked this pull request as draft August 2, 2026 23:22
@ninjaguardian
ninjaguardian marked this pull request as ready for review August 3, 2026 01:14
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

Successfully merging this pull request may close these issues.

1 participant