Skip to content

refactor: move all color related code into separate file - #4557

Merged
qwerty541 merged 1 commit into
anuraghazra:masterfrom
qwerty541:refactor_move_color_related_code_into_separate_file
Oct 11, 2025
Merged

refactor: move all color related code into separate file#4557
qwerty541 merged 1 commit into
anuraghazra:masterfrom
qwerty541:refactor_move_color_related_code_into_separate_file

Conversation

@opheliagoldstein

Copy link
Copy Markdown
Contributor

No description provided.

@vercel

vercel Bot commented Oct 11, 2025

Copy link
Copy Markdown

@qwerty541 is attempting to deploy a commit to the github readme stats Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added stats-card Feature, Enhancement, Fixes related to stats the stats card. repo-card Issues related to the pin/repo card. lang-card Issues related to the language card. wakatime-card Issues related to the wakatime card. ci CI related features. gist-card labels Oct 11, 2025

@opheliagoldstein opheliagoldstein left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✔️

@qwerty541
qwerty541 requested a review from Copilot October 11, 2025 19:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the codebase by extracting all color-related functionality from the main utils.js file into a dedicated color.js module for better code organization and separation of concerns.

Key changes:

  • Created a new src/common/color.js file containing all color utilities and theme functions
  • Removed color-related exports from src/common/utils.js and src/common/index.js
  • Updated import statements across test files and card modules to use the new color module

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/common/color.js New module containing all color utilities: isValidHexColor, isValidGradient, fallbackColor, and getCardColors
src/common/utils.js Removed color functions and updated JSDoc type reference for theme parameter
src/common/index.js Removed color-related exports from main index
tests/utils.test.js Updated import to use new color module for getCardColors
tests/card.test.js Updated import to use new color module for getCardColors
src/cards/*.js Updated imports across card modules to use new color module
scripts/preview-theme.js Updated import to use new color module for validation functions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/common/color.js
@qwerty541
qwerty541 merged commit 701068b into anuraghazra:master Oct 11, 2025
7 of 8 checks passed
@qwerty541
qwerty541 deleted the refactor_move_color_related_code_into_separate_file branch October 11, 2025 19:07
harryzcy pushed a commit to harryzcy/github-readme-stats that referenced this pull request Oct 16, 2025
martin-mfg pushed a commit to stats-organization/github-stats-extended that referenced this pull request Nov 2, 2025
ghosind pushed a commit to ghosind/github-readme-stats that referenced this pull request Dec 30, 2025
zimya pushed a commit to zimya/github-readme-stats-cf that referenced this pull request Jan 13, 2026
piscis pushed a commit to piscis/github-readme-stats that referenced this pull request Feb 7, 2026
zntb added a commit to zntb/github-readme-stats that referenced this pull request Jul 27, 2026
zntb added a commit to zntb/github-readme-stats that referenced this pull request Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI related features. gist-card lang-card Issues related to the language card. repo-card Issues related to the pin/repo card. stats-card Feature, Enhancement, Fixes related to stats the stats card. wakatime-card Issues related to the wakatime card.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants