Skip to content

chore(🎨): add tests for Color constructor - #3945

Merged
wcandillon merged 2 commits into
mainfrom
fix/2200-color-number-array
Jul 16, 2026
Merged

chore(🎨): add tests for Color constructor#3945
wcandillon merged 2 commits into
mainfrom
fix/2200-color-number-array

Conversation

@wcandillon

Copy link
Copy Markdown
Contributor

No description provided.

wcandillon and others added 2 commits July 16, 2026 08:30
…er colors

The native conversion of plain number arrays in Skia.Color() was fixed in
af4070b (#3719): JsiSkColor.h createCtor now converts a 4-element JS array
into a Float32Array, and JsiSkColor::fromValue as well as the recorder
Convertor.h accept plain arrays. The web implementation already converted
arrays via new Float32Array(color).

These tests lock in the behavior reported in the issue: Skia.Color([r,g,b,a])
(0-1 floats) round-trips identically to Skia.Color(new Float32Array([...]))
and to the equivalent string and ARGB number colors, on both web and native.

Fixes #2200

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@wcandillon
wcandillon merged commit 7e5b63e into main Jul 16, 2026
19 of 22 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 2.9.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@wcandillon
wcandillon deleted the fix/2200-color-number-array branch July 16, 2026 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant