fix: initial black color string should be #000000 rather than #000#1174
Merged
Brooooooklyn merged 1 commit intomainfrom Dec 15, 2025
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request updates the default black color string representation from the short 3-digit hex format #000 to the full 6-digit W3C-compliant format #000000. This change ensures consistency with W3C specifications for CSS color values and aligns with existing practices in other parts of the codebase (e.g., src/ctx.rs and src/state.rs already use #000000).
- Updates default Pattern color string to use
#000000 - Updates CanvasElement fillStyle and strokeStyle initialization to use
#000000 - Updates SVGCanvas fillStyle and strokeStyle initialization to use
#000000
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/pattern.rs | Updates the Default implementation for Pattern to use #000000 instead of #000 for the color string representation |
| src/lib.rs | Updates CanvasElement and SVGCanvas initialization to set fillStyle and strokeStyle hidden properties to #000000 instead of #000 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
64f27d7 to
9738d89
Compare
Collaborator
|
https://html.spec.whatwg.org/multipage/canvas.html#canvasfillstrokestyles |
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


per w3c specs