Skip to content

Commit

Permalink
refactor: Move generateRandomColor to generators directory
Browse files Browse the repository at this point in the history
The generateRandomColor function and its test have been moved from the utils directory to the generators directory. This change includes updates in the test file import paths and in the main index.ts file where the function is exported.
  • Loading branch information
mallikcheripally committed Jun 21, 2024
1 parent 8226e56 commit 4d6a284
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export { xyzToRgb } from '@/conversions/xyzToRgb';

// Generators
export { generateInterpolatedColors } from '@/generators/generateInterpolatedColors';
export { generateRandomColor } from '@/generators/generateRandomColor';


// Harmony
Expand Down Expand Up @@ -88,4 +89,3 @@ export { invertColor } from '@/manipulations/invertColor';
// Utils
export { BlendingModes } from '@/utils/blendingModes';
export { ColorFormats } from '@/utils/colorFormats';
export { generateRandomColor } from '@/utils/generateRandomColor';
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { generateRandomColor } from '@/utils/generateRandomColor';
import { ColorFormats } from '@/utils/colorFormats';
import {hexAlphaRegex, hexRegex, hslaRegex, hslRegex, labRegex, lchRegex, rgbaRegex, rgbRegex} from '@/utils/regex';
import { generateRandomColor } from '../../src/generators/generateRandomColor';
import { ColorFormats } from '../../src/utils/colorFormats';
import {hexAlphaRegex, hexRegex, hslaRegex, hslRegex, labRegex, lchRegex, rgbaRegex, rgbRegex} from '../../src/utils/regex';

describe('generateRandomColor', () => {
test('generates a random RGB color as a string', () => {
Expand Down

0 comments on commit 4d6a284

Please sign in to comment.